Cap Theorem easy
The CAP theorem states that in the event of a network partition, a system must choose between:
- A Total Latency and Maximum Throughput (optimizing for speed vs. total volume processed).
- B Strong Consistency and High Availability (ensuring data matches vs. ensuring the system stays up).
- C Network Security and Global Usability (protecting data vs. making it easily accessible).
- D CPU Utilization and Memory Efficiency (optimizing for compute cycles vs. RAM consumption).
Answer: B. Strong Consistency and High Availability (ensuring data matches vs. ensuring the system stays up).
If the network is partitioned (P), the system has exactly two choices: 1. Fail the request to ensure no one sees stale or conflicting data (Consistency), or 2. Complete the request using the local copy, even if it might be out of sync with other nodes (Availability). You cannot have both perfect Consistency and perfect Availability during a network failure.
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?