Readyset Docs

MySQL

If you're using AWS Aurora MySQL, you'll need to make a few configuration changes via the AWS console to enable Readyset Cache to properly replicate tables.

Instructions

Note: Readyset Cache only needs access to the write node of any Aurora cluster.

1. Establish a network connection

Note: these directions assume you are using Readyset Cache in a different VPC than the upstream database you're connecting to. If Readyset Cache is within the same VPC as your database, you can ignore this step.

To make sure Readyset Cache can connect with your database, the database will have to be publicly accessible.

  1. Click on RDS, which can be found by searching for it in the search bar, under the Services menu, or in your Recently Visited area. Within RDS under the Resources section, select DB instances.
  2. Choose the write node instance you want to use.
  3. Click the Modify button in the upper right corner.
  4. In the Connectivity section, click on Additional configurations.

Connectivity 1

  1. Under Public access, choose Publicly accessible.

Connectivity 2

  1. Click on Continue at the bottom of the page.
  2. Select when you want to apply the change and click Modify DB instance.

2. Enable binary logging

Readyset Cache replicates changes from the MySQL binary log, so binlog must be enabled with row-based logging at the cluster level.

Note: To use Readyset Cache with Aurora, you must configure a DB cluster parameter group. Binlog settings must be applied at the cluster level.
  1. Under the Resources section, select Parameter groups and create a new DB Cluster Parameter Group for your Aurora MySQL version.
  2. Edit the group and set binlog_format to ROW and binlog_row_image to FULL.
  3. Associate the cluster parameter group with your Aurora cluster.
  4. Reboot the writer instance if required for the parameters to take effect.

For the full list of binlog variables Readyset Cache expects, see General MySQL configuration.

3. Set binlog retention

Ensure the binary logs are retained long enough for Readyset Cache to complete its initial snapshot. Connect to the write node and run:

call mysql.rds_set_configuration('binlog retention hours', 24);

A reasonable value here is one hour of retention for every 150 GB of database size.

4. Grant privileges to the Readyset Cache user

Grant the Readyset Cache user the privileges it needs to snapshot and replicate. See General MySQL configuration for the full list and an example GRANT statement.