Deploy with ReadySet Cloud¶
This page shows you how to get up and running with a fully-managed deployment of ReadySet on ReadySet Cloud.
Tip
If you are new to ReadySet, consider running through the Quickstart first.
Before you begin¶
-
Note that ReadySet Cloud can integrate with:
If you want to integrate with another variant of Postgres or MySQL, please contact ReadySet.
-
Note that ReadySet does not currently support row-level security. Make sure any RLS policies are disabled.
-
For Amazon RDS for Postgres and Supabase, make sure tables without primary keys have
REPLICA IDENTITY FULL
before connecting ReadySet. Otherwise, Postgres will block writes and deletes on those tables.
Step 1. Get early access¶
ReadySet Cloud is currently in closed beta.
Get early access to ReadySet Cloud
Step 2. Collect required details¶
Once you've signed up, ReadySet will schedule time to discuss your use case, give you an overview of the onboarding process, and ask for required details about your database. Please collect these details ahead of the call.
- Get your AWS account ID.
- Get your AWS region:
- In the RDS Console, go to Databases.
- Select your database.
- In the Summary area, note the Region & AZ.
- Get your database connection string:
- In the Connectivity & security area, note the Endpoint.
- Get the version of Postgres you are using:
- Click the Configuration tab.
- In the Instance area, note the Engine version.
- Get the the ID and CIDR of your database's VPC:
- Click the Connectivity & security tab.
- In the Connectivity & security area, click the VPC ID.
- Note the VPC ID.
- Note the IPv4 CIDR.
- Share all collected details during your call with ReadySet.
- Get your AWS account ID.
- Get your AWS region:
- In the RDS Console, go to Databases.
- Select your database.
- In the Summary area, note the Region & AZ.
- Get your database connection string:
- In the Connectivity & security area, note the Endpoint.
- Get the version of MySQL you are using:
- Click the Configuration tab.
- In the Instance area, note the Engine version.
- Get the the ID and CIDR of your database's VPC:
- Click the Connectivity & security tab.
- In the Connectivity & security area, click the VPC ID.
- Note the VPC ID.
- Note the IPv4 CIDR.
- Share all collected details during your call with ReadySet.
- Get your AWS region:
- In the Supabase Dashboard, go to Project Settings > General.
- Scroll to the Infrastructure area.
- Note the Region.
-
Get your database connection string:
- Scroll down to the Connection string area.
-
Select URI and note the connection string.
Warning
Be sure to note the connection string under Connection string, not under Connection pooling. To verify that you have the correct one, check for port
5432
.
-
Share all collected details during your call with ReadySet.
Step 3. Configure your database¶
ReadySet uses your database's replication stream to automatically keep your cache up-to-date as the database changes.
On your call with ReadySet, you'll ensure replication is enabled. The steps are provided here for convenience.
-
Connect the
psql
shell to your database, replacing placeholders with your database connection details:PGPASSWORD=<password> psql \ --host=<database_endpoint> \ --port=<port> \ --username=<username> \ --dbname=<database_name>
Tip
To find the database endpoint, select your database in the RDS Console, and look under Connectivity & security.
-
Check if replication is enabled:
If replication is already on, skip to Step 4:
If replication is off, continue to the next step:
-
Create a custom parameter group.
- For Parameter group family, select the Postgres version of your database.
- For Type, select DB Parameter Group.
- Give the group a name and description.
-
Edit the new parameter group and set the
rds.logical_replication
parameter to1
. -
Associate the parameter group to your database.
-
Be sure to use the Apply Immediately option. The database must be rebooted in order for the parameter group association to take effect.
-
Do not move on to the next step until the database Status is Available in the RDS Console.
-
-
Back in the SQL shell, verify that replication is now enabled:
Tip
If replication is still not enabled, reboot the database.
Once the database Status is Available in the RDS Console, check replication again.
Following your call with ReadySet, ReadySet will start your deployment.
-
At first, ReadySet will take a snapshot of your data, which can take between a few minutes to several hours, depending on the size of your dataset.
Warning
Make sure there are no DDL statements in progress. Until the entire snapshot is finished, DDL statements (e.g.,
ALTER
andDROP
) against tables in your snapshot will be blocked. -
Once snapshotting is finished, ReadySet will send you the ReadySet connection string.
-
In RDS MySQL, replication is enabled only when automated backups are also enabled. If you didn't enable automated backups when creating your database instance, enable automated backups now.
-
Be sure to use the Apply Immediately option. The database must be rebooted in order for the change to take effect.
-
Do not move on to the next step until the database Status is Available in the RDS Console.
-
-
Connect the
mysql
shell to your database, replacing placeholders with your database connection details:mysql \ --host=<database_endpoint> \ --port=<port> \ --user=<username> \ --password=<password> \ --database=<database_name>
Tip
To find the database endpoint, select your database in the RDS Console, and look under Connectivity & security.
-
In the
mysql
shell, verify that replication is enabled:+---------------+-------+ | Variable_name | Value | +---------------+-------+ | log_bin | ON | +---------------+-------+ 1 row in set (0.00 sec)
Tip
If replication is still not enabled, reboot the database.
Once the database Status is Available in the RDS Console, check replication again.
-
Check the binary logging format:
If the binary logging format is
ROW
, skip to Step 4:+---------------+-------+ | Variable_name | Value | +---------------+-------+ | binlog_format | ROW | +---------------+-------+ 1 row in set (0.00 sec)
If the binary logging format is not
ROW
, continue to the next step: -
Create a custom parameter group.
- For Parameter group family, select the MySQL version of your database.
- For Type, select DB Parameter Group.
- Give the group a name and description.
-
Edit the new parameter group and set the
binlog_format
parameter toROW
. -
Associate the parameter group to your database.
-
Be sure to use the Apply Immediately option. The database must be rebooted in order for the parameter group association to take effect.
-
Do not move on to the next step until the database Status is Available in the RDS Console.
-
-
Back in the SQL shell, verify that the binary logging format is
ROW
:+---------------+-------+ | Variable_name | Value | +---------------+-------+ | binlog_format | ROW | +---------------+-------+ 1 row in set (0.00 sec)
Tip
If the binary logging format is still not
ROW
, reboot the database.Once the database Status is Available in the RDS Console, check the binary logging format again.
Following your call with ReadySet, ReadySet will start your deployment.
-
At first, ReadySet will take a snapshot of your data, which can take between a few minutes to several hours, depending on the size of your dataset.
Warning
Make sure there are no DDL statements in progress. Until the entire snapshot is finished, DDL statements (e.g.,
ALTER
andDROP
) against tables in your snapshot will be blocked. In MySQL,INSERT
andUPDATE
statements will also be blocked, but only while a given table is being snapshotted. -
Once snapshotting is finished, ReadySet will send you the ReadySet connection string.
In Supabase, replication is already enabled. However, you must change the postgres
user's permissions so that ReadySet can create a replication slot.
-
In the Supabase Dashboard, go to the SQL Editor.
-
Change the
postgres
user's permissions toSUPERUSER
:
Following your call with ReadySet, ReadySet will start your deployment.
-
At first, ReadySet will take a snapshot of your data, which can take between a few minutes to several hours, depending on the size of your dataset.
Warning
Make sure there are no DDL statements in progress. Until the entire snapshot is finished, DDL statements (e.g.,
ALTER
andDROP
) against tables in your snapshot will be blocked. -
Once snapshotting is finished, ReadySet will send you the ReadySet connection string.
Step 4. Cache queries¶
-
Once you have the ReadySet connection string, update your app to connect to ReadySet instead of the upstream database. See Connect an App for client library and ORM examples.
Note
By default, ReadySet will proxy all queries to the upstream database, so changing your app to connect to ReadySet should not impact performance. You will explicitly tell ReadySet which queries to cache.
-
Use your preferred monitoring tool to identify slow queries.
-
For each query you want to cache:
-
Connect the
psql
shell to your ReadySet Cloud instance, using the connection string that ReadySet provided: -
Run ReadySet's custom
SHOW PROXIED QUERIES
command: -
In the command output, find the query and check the
readyset supported
value:- If the value is
pending
, check again until you seeyes
orno
. - If the value is
yes
, ReadySet can cache the query. -
If the value is
no
, ReadySet cannot cache the query.Note
To successfully cache the results of a query, ReadySet must support the SQL features and syntax in the query. For more details, see SQL Support. If an unsupported feature is important to your use case, submit a feature request.
- If the value is
-
If the query is supported, use ReadySet's custom
CREATE CACHE
command to cache the query results in ReadySet:Tip
You can provide either the full
SELECT
text or the query ID listed in theSHOW PROXIED QUERIES
output.Caching will take a few minutes, as it constructs the initial dataflow graph for the query and adds indexes to the relevant ReadySet table snapshots, as necessary. The
CREATE CACHE
command will return once this is complete. -
Use ReadySet's custom
SHOW CACHES
command to verify that the cache has been created for your query:
-
-
Use your preferred monitoring tool to check how fast results are now returning for your cached queries.
Next steps¶
- Use your private Slack channel to report issues or ask questions. This Slack channel was created for you during your onboarding call with ReadySet.
- Join the Discord chat to interact with the broader ReadySet community.