What is Read Replicas?

Nadtakan Futhoem
2 min readApr 13, 2021

--

  • Read Replicas are NOT used for resiliency or as a secondary instance in the event of a failover.
  • Read Replicas are used to serve read-only access to your database data via a separate instance

Use case: Let’s assume we have a primary RDS instance that serves both read and write traffic. Due to the size of the instance and the amount of read-intensive traffic being directed to the database for queries. the performance of the instance is taking a hit.

To help resolve this, you can create a read replica. A snapshot will be taken of your database, and if you are using Multi-AZ, then this snapshot will be taken of your secondary database instance to ensure that there are no performance impacts during the process. Once the snapshot is completed, a read replica instance is created from this data.

The read replica then maintains a secure asynchronous link between itself and the primary database. At this point, read-only traffic can be directed to the read replica to serve queries or business intelligence tools.

By implementing read replicas, it helps to offload this traffic from the primary instance, and therefore, helping with overall performance.

Do we aware deploying read replicas is only available for Aurora, Oracle, SQL Server, MySQL, Maria DB, and Postgre SQL database engines.

It’s possible to deploy more than one read replica for a primary database and there are a number of different reasons as to why you might want to do this.

  1. It allows you to scale your read performance to a wider range of tools and applications that need to query the data without being restricted to a single read replica.
  2. It’s also possible to deploy a read replica in a different region, which significantly helps to enhance your DR capabilities.
  3. It’s also possible to promote an exiting read replica to replace the primary database in the event of an incident. Also, during any maintenance that is being performed on your primary instance where I/O requests may have been suspended, then read traffic can still be served by read replica.

Read replica on different DB Engine

  • The retention value of backups needs to be set to a value ≥ 1
  • Replication is also only possible when using an InnoDB storage engine which is transactional.
  • Mysql and Maria DB allow for nested read replicas

Thank you for reading and leave me a comment if you have any questions.

Follow me on Twitter or LinkedIn if you like.

--

--

Nadtakan Futhoem
Nadtakan Futhoem

No responses yet