Cap Theorem easy
Can you tune a database to be *partially* Consistent and *partially* Available?
- A No, CAP is a binary architectural switch that must be hard-coded into the database engine during the initial design phase.
- B Yes, systems like Cassandra allow tuning (e.g., Read/Write Quorums) to adjust the balance between C and A based on the specific query.
- C Only if the system is running on specialized quantum hardware that allows for the superposition of multiple divergent data states.
- D Yes, but this functionality is typically restricted to off-peak hours or specific maintenance windows to prevent system-wide instability.
Answer: B. Yes, systems like Cassandra allow tuning (e.g., Read/Write Quorums) to adjust the balance between C and A based on the specific query.
CAP is often viewed as a spectrum rather than a binary choice. Many 'tunable consistency' systems allow you to specify the number of nodes that must acknowledge a write (W) or a read (R). For example, you can choose W=1 for speed/availability in one part of your app, and W=Quorum for consistency in another part, all within the same cluster.
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?