Interview Questions/System Design/Design a Cross-Region Database Replication System
AdvancedSystem-Design
45 min

Design a Cross-Region Database Replication System

DatabasesReplicationConsistencyDisaster Recovery
Advertisement
Interview Question

Design a database system that replicates across regions with low latency, conflict resolution, and disaster recovery.

Key Points to Cover
  • Replication models: async, semi-sync, sync
  • Conflict resolution: last-write-wins, CRDTs, app-level
  • Disaster recovery: failover, RTO/RPO objectives
  • Topology: active-active vs active-passive
  • Monitoring and observability for replication lag
Evaluation Rubric
Clear replication models & trade-offs25% weight
Effective conflict resolution25% weight
Robust disaster recovery strategy25% weight
Operational observability & SLAs25% weight
Hints
  • 💡Be explicit about RPO and RTO goals.
Common Pitfalls to Avoid
  • ⚠️Underestimating the complexity of network latency across vast geographical distances.
  • ⚠️Failing to adequately test conflict resolution strategies under realistic concurrent write scenarios.
  • ⚠️Setting unrealistic RTO/RPO objectives that are not aligned with budget or technical feasibility.
  • ⚠️Neglecting to implement comprehensive monitoring and alerting for replication lag and failover status.
  • ⚠️Assuming that a 'one-size-fits-all' replication model or conflict resolution strategy will work for all data types and access patterns.
Potential Follow-up Questions
  • How do you handle schema migrations?
  • How do you test failover safely?
Advertisement