Junior SQL

What is a read replica and how does it help with scaling?

A read replica is a copy of a database that is used to offload read-only queries from the

primary database (master). It is particularly useful for handling high read traffic and

improving database scalability.

  • How it helps with scaling:
  • By distributing read requests across multiple replicas, the primary database

can focus on write operations, reducing the load on the master.

  • It improves performance by providing additional resources dedicated to read

operations.

  • Example: In a web application with high traffic, multiple read replicas can

serve read-heavy queries, while writes are only made to the master database.

Note: Read replicas are usually asynchronous, meaning there can be a slight delay in

replication. For critical real-time reads, this might not be suitable.

More from SQL Server Tutorial

All questions for this course