A Read Replica is a live copy of a Database Instance that behaves like an Instance, but that only allows read-only connections. The replica mirrors the data of the primary Database node and any changes made are replicated to the replica asynchronously. Read Replicas allow you to scale your Database Instance for read-heavy database workloads. They can also be used for business intelligence workloads.
A Read Replica can have at most one direct access and one Private Network endpoint. Loadbalancer endpoints are not available on Read Replicas even if this resource is displayed in the Read Replica response example.
If you want to remove a Read Replica endpoint, you can use delete a Database Instance endpoint API call.
Instance Access Control Lists (ACL) also apply to Read Replica direct access endpoints.
Limitations: There might be replication lags between the primary node and its Read Replica nodes. You can try to reduce this lag with some good practices:
- All your tables should have a primary key
- Don't run large transactions that modify, delete or insert lots of rows. Try to split it into several small transactions.
Create a Read Replica
Create a new Read Replica of a Database Instance. You must specify the region and the instance_id. You can only create a maximum of 3 Read Replicas per Database Instance.
path Parameters
regionThe region you want to target
Create a Read Replica › Request Body
instance_idUUID of the Database Instance you want to create a Read Replica from. (UUID format)
Specification of the endpoint you want to create.
same_zoneDefines whether to create the replica in the same availability zone as the main instance nodes or not.
Create a Read Replica › Responses
idUUID of the Read Replica. (UUID format)
Display Read Replica connection information.
statusRead replica status.
regionRegion the Read Replica is in.
same_zoneWhether the replica is in the same availability zone as the main instance nodes or not.
instance_idUUID of the Database Instance.
Get a Read Replica
Retrieve information about a Database Instance Read Replica. Full details about the Read Replica, like endpoints, status and region are returned in the response.
path Parameters
regionThe region you want to target
read_replica_idUUID of the Read Replica. (UUID format)
Get a Read Replica › Responses
idUUID of the Read Replica. (UUID format)
Display Read Replica connection information.
statusRead replica status.
regionRegion the Read Replica is in.
same_zoneWhether the replica is in the same availability zone as the main instance nodes or not.
instance_idUUID of the Database Instance.
Delete a Read Replica
Delete a Read Replica of a Database Instance. You must specify the region and read_replica_id parameters of the Read Replica you want to delete.
path Parameters
regionThe region you want to target
read_replica_idUUID of the Read Replica. (UUID format)
Delete a Read Replica › Responses
idUUID of the Read Replica. (UUID format)
Display Read Replica connection information.
statusRead replica status.
regionRegion the Read Replica is in.
same_zoneWhether the replica is in the same availability zone as the main instance nodes or not.
instance_idUUID of the Database Instance.
Create an endpoint for a Read Replica
Create a new endpoint for a Read Replica. Read Replicas can have at most one direct access and one Private Network endpoint.
path Parameters
regionThe region you want to target
read_replica_idUUID of the Read Replica. (UUID format)
Create an endpoint for a Read Replica › Request Body
Specification of the endpoint you want to create.
Create an endpoint for a Read Replica › Responses
idUUID of the Read Replica. (UUID format)
Display Read Replica connection information.
statusRead replica status.
regionRegion the Read Replica is in.
same_zoneWhether the replica is in the same availability zone as the main instance nodes or not.
instance_idUUID of the Database Instance.
Promote a Read Replica
Promote a Read Replica to Database Instance automatically.
path Parameters
regionThe region you want to target
read_replica_idUUID of the Read Replica. (UUID format)
Promote a Read Replica › Responses
created_atCreation date (must follow the ISO 8601 format). (RFC 3339 format)
Volumes of the Database Instance.
regionRegion the Database Instance is in.
idUUID of the Database Instance. (UUID format)
nameName of the Database Instance.
organization_idOrganization ID the Database Instance belongs to. (UUID format)
project_idProject ID the Database Instance belongs to. (UUID format)
statusStatus of the Database Instance.
engineDatabase engine of the database (PostgreSQL, MySQL, ...).
Available database engine versions for upgrade.
tagsList of tags applied to the Database Instance.
Advanced settings of the Database Instance.
Backup schedule of the Database Instance.
is_ha_clusterDefines whether or not High-Availability is enabled.
Read Replicas of the Database Instance.
node_typeNode type of the Database Instance.
List of engine settings to be set at database initialization.
List of Database Instance endpoints.
Logs policy of the Database Instance.
backup_same_regionStore logical backups in the same region as the Database Instance.
List of Database Instance maintenance events.
Encryption at rest settings for your Database Instance.
Endpoint of the Database Instance.
Resync a Read Replica
When you resync a Read Replica, first it is reset, then its data is resynchronized from the primary node. Your Read Replica remains unavailable during the resync process. The duration of this process is proportional to the size of your Database Instance. The configured endpoints do not change.
path Parameters
regionThe region you want to target
read_replica_idUUID of the Read Replica. (UUID format)
Resync a Read Replica › Responses
idUUID of the Read Replica. (UUID format)
Display Read Replica connection information.
statusRead replica status.
regionRegion the Read Replica is in.
same_zoneWhether the replica is in the same availability zone as the main instance nodes or not.
instance_idUUID of the Database Instance.