Cap Theorem medium
What is the function of 'Read Repair' in an eventually consistent system?
- A A proactive background scan that identifies and corrects physical SSD sectors before they lead to data corruption.
- B An automated system-wide pause that is triggered to fix network route configurations during a detected partition.
- C Detecting stale replicas during a read operation and automatically updating them with the latest version in the background.
- D A client-side retry policy that forces the application to repeat the same request exactly three times before failing.
Answer: C. Detecting stale replicas during a read operation and automatically updating them with the latest version in the background.
Read Repair is an 'anti-entropy' mechanism used in AP systems (like Cassandra). Since writes aren't guaranteed to reach every node immediately, inconsistencies are inevitable. When a client reads data, the system queries multiple replicas. If it finds a version mismatch, it immediately pushes the newest version back to the stale replicas (repairing them). This allows the system to eventually converge on a consistent state without centralized coordination.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- What is a 'Split Brain' scenario?
- The PACELC theorem extends CAP by stating: Even when there is NO partition (E), the system must choose between:
- Why is a CA (Consistent + Available) system generally considered impossible for distributed web applications?
- In CAP, 'Consistency' is equivalent to:
- In the CAP Theorem, what does the 'P' stand for?
- What causes a Network Partition?