0
0
HLDsystem_design~20 mins

Read replicas in HLD - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Read Replica Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Understanding the primary purpose of read replicas

What is the main reason to use read replicas in a database system?

ATo reduce network latency by storing data closer to users
BTo provide backup storage for disaster recovery only
CTo increase the write throughput by distributing write operations
DTo improve read scalability by distributing read operations
Attempts:
2 left
💡 Hint

Think about how read replicas help when many users want to access data simultaneously.

Architecture
intermediate
2:00remaining
Choosing the correct architecture for read replicas

Which architecture best describes a system using read replicas to handle high read traffic?

AOne primary database handling writes and multiple read replicas handling read queries
BMultiple primary databases each handling a subset of writes and reads independently
CMultiple read replicas handling writes and a primary database handling reads
DA single primary database handling all reads and writes with no replicas
Attempts:
2 left
💡 Hint

Consider which node handles writes and which nodes handle reads in a typical read replica setup.

scaling
advanced
2:30remaining
Scaling read replicas for global users

You have a global user base with users in multiple continents. How should you deploy read replicas to minimize read latency?

ADeploy read replicas only in the primary database region to keep data consistent
BDeploy read replicas in multiple geographic regions close to user clusters
CDeploy read replicas randomly without considering user location
DUse a single read replica in a central location with the fastest network
Attempts:
2 left
💡 Hint

Think about how placing data closer to users affects latency.

tradeoff
advanced
2:30remaining
Tradeoffs of using read replicas for strong consistency

What is a common tradeoff when using read replicas in systems that require strong consistency?

ARead replicas may serve stale data due to replication lag
BRead replicas always provide up-to-date data with no delay
CRead replicas improve write performance by delaying replication
DRead replicas eliminate the need for a primary database
Attempts:
2 left
💡 Hint

Consider what happens when data changes on the primary but replicas have not yet updated.

estimation
expert
3:00remaining
Estimating read replica capacity for a high-traffic system

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?

A4 read replicas
B10 read replicas
C5 read replicas
D6 read replicas
Attempts:
2 left
💡 Hint

Divide total read requests by capacity per replica and round up.