PolyScale is an intelligent, serverless database caching engine which allows low-latency reads from Supabase globally, no coding required.
With PolyScale, you can connect your Supabase project (or any MySQL, MariaDB, Postgres or MS SQL databases) with a simple config change, without writing code or deploying servers.
PolyScale will distribute, cache and allow you to query your database data close to your application/microservice tier, for low latency queries and massive concurrency.
Supabase can be connected to PolyScale in minutes, providing you fast access to your Supabase data around the globe.
This guide explains how to connect Supabase to a PolyScale cache.
The video below illustrates how to get connected. Or you can read the steps below.
PolyScale provides caching for TCP connections and GraphQL. Support for caching with the Supabase client is coming soon.
Step 0: Create a PolyScale account
If you do not already have a PolyScale account, you can create an account here. PolyScale offers a free plan and no credit card is required.
Step 1: Create your PolyScale Cache
1.1 Retrieve your Supabase Host
In your Supabase project, click on
Settings > Database and scroll down to the
Connection parameters section. Make sure you have
Use connection pooling checked, then copy your database
1.2 Configure your PolyScale Cache
- In your PolyScale account, click on the New Cache button
- Give the cache a Name
- Select PostgreSQL for the Type
- Enter the Host from Step 1.1 above
5432for the Port
- Click Create
Your cache is now created. PolyScale automatically checks to see that your database is accessible from all our global PoPs.
Step 2: Connect to your PolyScale Cache
Using your PolyScale cache is simple -- instead of connecting to your Supabase database directly, you'll replace your original connection string with the PolyScale connection string in your application.
For example, if your original connection string was:
Your PolyScale connection string would be:
You can read more about connecting to PolyScale here