InterviewBuddy
All interview questions

What is the tradeoff in database replication?

Intermediate

Answer

Replicas can distribute reads and improve availability, but asynchronous replication can make reads temporarily stale. Failover and write ordering need deliberate design.

Explanation

Choose whether a workflow needs read-your-writes consistency. Routing a just-written record to a lagging replica can confuse users.

Example

Write primary → replication lag → read replica