Open In App

RDS Read Replicas – How It is Different from RDS Multi-AZ Deployment

Last Updated : 08 Jan, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

Amazon RDS (Relational Database Service) is a fully managed service by AWS to deploy and scale relation database systems in the cloud. Amazon RDS supports a lot of relation database engines such as MYSQL, PostgreSQL, Oracle, SQL Server, etc.

Amazon RDS comes with a lot of handy features such as encryption, scaling, snapshotting, disaster recovery, etc. Therefore, the can developer can focus on the development of the application without worrying about the underlying database infrastructure.

Note: RDS supports both horizontal and vertical scaling methodologies.

What Is RDS Read Replicas?

RDS read replicas are a way to scale reads in an RDS Database by creating multiple read-only, database instances of the primary database. RDS supports up to 15 read replicas per database instance and the read replicas can be located in the same availability zones, in different availability zones, or even in other regions. Every read replica can be promoted to its databases. However, the major limitation of read replicas is that it only support select clause queries, which means all the database instances except the primary database instance will only support read operations.

When data is written to the primary database instance it gets replicated to its read replicas by using asynchronous mode of replication.

Asynchronous Replication: Services that use asynchronous replication copy data to the replica after the data is already written to the primary storage.

RDS Read Replicas

Advantage Of Read Replicas

  • Gives an ability to scale read operation in relational databases in order to support read-intensive workloads.
  • Read replicas can be promoted to their own standalone database instance at any time.
  • Reduces the data access time by deploying the read replicas in multiple regions.
  • You can reduce the load of the source DB by routing the read queries to read replicas.

Disadvantage Of Read Replicas

  • Read Replicas supports only select clause queries.
  • The data which has been created (or) modified at the source DB takes some time to get updated at the read replicas since they use asynchronous mode of replication.
  • Charges are applied if the read replicas are present in different regions.

How Is Read Replicas Differ From Multi-AZ Deployment

RDS Multi AZ deployments are mainly used for backups and disaster recovery strategies. Multi AZ deployments contain a primary database and a standby database, when the primary database goes down (or) becomes unavailable the standby database becomes active.

While read replicas are used to scale reads in a database, multi-AZ deployments are used to increase availability of data. Multi-AZ deployments uses synchronous mode of replication.

SYNCHRONOUS REPLICATION : In synchronous replication data will be written to two or more systems simultaneously.

ATTRIBUTES

RDS READ REPLICAS

RDS MULTI-AZ DEPLOYMENT

PURPOSE

Used to scale reads in a database by creating multiple read only databases.

Used to increase availability of a database by creating an exact replica of the entire database and deploying it in another AZ.

MODE OF REPLICATION

Used asynchronous mode of replication.

Used synchronous mode of replication.

SUPPORTED OPERATIONS

Other than source databases, all the read replicas only support select clause queries.

Both primary and standby databases support all types of queries.

NO. OF DUPLICATE DB INSTANCES

Supports up to 15 read replicas for a single DB instance.

Supports only 2 databases: a primary database and a secondary database.

OTHERS

Read replicas can be promoted to its own databases.

The standby database becomes active only when the primary database is not available.

FAQs On RDS Multi-AZ Deployment

1. Why does the changes which are made in the primary database take some time to get updated in the read replicas?

Since, Read replicas use asynchronous mode of replication the data will be copied to the read replicas only after the changes are being made to the primary database.

2. Is there any cost associated with reading replicas?

If the read replicas between cross-regions then a charge is applied for the replication process. If the read replicas are present in the region where the source DB is present then replication charges are not involved.

3. Does read replicas support write operation?

No, read replicas only support select clause SQL Queries. but, They can be promoted to their own standalone database.


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads