Open In App

Amazon RDS – Working with Read Replicas

Last Updated : 27 Mar, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

This article intends to make you aware of “Read Replicas”. As the name itself indicates, read replica allows us to have “non-editable copies” of our production database. This is done by doing asynchronous replication from the primary RDS Instance, to the replicas, i.e. updates made on the source database are reflected on the replicas as well. These replicas can be made in the same or different regions which can make the recovery of data easier. All the database engines support the replication fundamentals. For understanding the concept of read replicas with a diagrammatical approach, refer to the image attached.

Advantages of the Read Replicas:

  1. Performance: Read replicas deviate all the read queries traffic from the source database to itself, i.e. all the load generated with the queries related to reading the database are handled by these replicas and this eventually enhances the overall performance of the RDS. Also, replicas can be region-specific too which ultimately creates a big difference in the performance.
  2. Availability: There are chances of hardware failures in such huge databases, to conquer disastrous situations like source data hardware failure, data recovery, etc, RDS allows us to promote a replica of the collapsed database as a standalone database itself. This will handle the current situation better and the setup won’t be completely failed.
  3. Security: Besides every other concern, security is the prime concern of all the services given by AWS. Thus, while creating read replicas, RDS encrypts the data using public keys in order to establish a secure environment for the data. This is the by default setup initiated by RDS, we can also add other securities as per our needs and requirements.

Some commendable features of the Read Replicas:

  • At most, we can have up to 5 read replicas of any particular database.
  • In a bigger organization, where the data is humongous in the amount we can also create read replicas of the Read replicas but this feature comes along with a latency constraint.
  • For making, it more scalable at times of heavy workloads, these replicas can also be transformed into independent databases.
  • Whenever some hardware failure occurs on the primary database, at that time one of the replicas is promoted as primary in order to reduce the amount of loss that occurred by the failure.

Let us know about the steps involved in creating a read replica.

Note: As we all know, the concept of replicas is useful for huge organizations as they have a large database to work with. Thus, AWS has not allotted this facility for free tier accounts as we individuals do not need this service. 

Step 1: Login into your AWS account. From services select RDS. Image attached ahead to refer to.

Step 2: Select the database you want to make read replicas of. And from “Actions” choose “Read Replicas”. Here is the image attached to refer to. 

Step 3: Once you are directed ahead. Align all the configurations as per your requirements. Refer to the image attached ahead. 

Step 4: When you find everything appropriately configured as per the needs. Click on “Create Read Replica”. Refer to the image attached ahead for understanding better.

In this way, we can create a read replica. If you are also a free tier account user make sure you delete all the instances you have created before logging out. This will reduce the chance of you getting a bill at the end of the month. 


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads