What is the main reason to use read replicas in a database system?
Think about how read replicas help when many users want to access data simultaneously.
Read replicas are primarily used to distribute read requests, improving read scalability and reducing load on the primary database.
Which architecture best describes a system using read replicas to handle high read traffic?
Consider which node handles writes and which nodes handle reads in a typical read replica setup.
In a read replica architecture, the primary database handles all writes, while read replicas serve read queries to scale read capacity.
You have a global user base with users in multiple continents. How should you deploy read replicas to minimize read latency?
Think about how placing data closer to users affects latency.
Deploying read replicas geographically close to users reduces network latency and improves read performance globally.
What is a common tradeoff when using read replicas in systems that require strong consistency?
Consider what happens when data changes on the primary but replicas have not yet updated.
Replication lag means read replicas might not have the latest data immediately, causing potential stale reads.
Your system receives 10,000 read requests per second and 1,000 write requests per second. Each read replica can handle 2,000 reads per second. How many read replicas do you need to handle the read load without overloading the primary?
Divide total read requests by capacity per replica and round up.
To handle 10,000 reads per second with each replica handling 2,000, you need 10,000 / 2,000 = 5 replicas.