intermediateDistributed Systems — Replication, Partitioning & Consistency
A write to your distributed database succeeded but the user can't see their update. What could be happening and how do you fix it?
Root causes: 1) Read-after-write inconsistency: write went to primary/leader; read went to a replica that hasn't replicated yet. Solution: read-your-own-writes guarantee. In MongoDB: use causally consistent sessions. In Cassandra: use QUORUM for both reads and writes. 2) Load balancer routing: user's GET request routed to different server that has stale cache. Solution: sticky sessions for that us
Ready to master this question?
Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.
Sign in to generate a response