Architecture
Note:
- The read replica functionality is available only for licensed users.
- This feature is currently in beta and disabled by default. To enable it, use the environment variable
CONVOY_ENABLE_FEATURE_FLAG=read-replicasor the CLI flag--enable-feature-flag=read-replicas.
Configuring Read Replicas
JSON Configuration
You can configure read replicas by adding theread_replicas object to your database configuration JSON. Each read replica should be an object with the following keys:
using read replicas via JSON configuration
CLI Configuration
Alternatively, you can use theread-replicas-dsn configuration option to provide a list of connection strings.
Each connection string should follow the format:
<dbms>://<username>:<password>@<host>:<port>/<database>
Here’s what each field represents:
For example:
using read replicas via CLI
Important: Make sure the connection strings are formatted correctly, including the database name, username, password, host, and port.