This question evaluates a candidate's competency in distributed systems and data consistency, focusing on cache–database consistency, concurrent write handling, versioning/CAS, distributed locking, cache invalidation strategies, idempotency, and failure recovery in high-throughput services.
You operate a high-throughput service using a cache (e.g., Redis) in front of a relational database. Multiple application servers may concurrently update the same logical record (key). You must prevent and resolve cache–database update conflicts and race conditions while keeping performance high.
Design how to prevent and resolve conflicts across these areas:
Specify:
Provide read and write flows, including conflict resolution and failure handling.
Login required