16. Consistency and CAP
Interview questions
Interview questions (with the counter-questions you'll get)
Q1. Explain the CAP theorem.
They're testing: whether you can state it precisely, not as a slogan.
Think about your answer first, then open it.
Q2. What's the difference between strong and eventual consistency?
They're testing: clear definitions and trade-offs.
Think about your answer first, then open it.
Q3. Give an example of choosing CP vs AP.
They're testing: applying the theory.
Think about your answer first, then open it.
Q4. What is PACELC?
They're testing: knowing beyond CAP.
Think about your answer first, then open it.
Q5. What is linearizability?
They're testing: precision.
Think about your answer first, then open it.
Q6. What are read-your-writes and monotonic reads? Why do they matter?
They're testing: practical, cheaper guarantees.
Think about your answer first, then open it.
Q7. How do you handle conflicts in an AP system?
They're testing: what happens after "accept writes everywhere".
Think about your answer first, then open it.
Q8. Do quorums give strong consistency?
They're testing: depth.
Think about your answer first, then open it.
Q9. How would you design a wallet that works across two regions?
They're testing: applying CAP to money.
Think about your answer first, then open it.
Q10. Is your favourite database CP or AP?
They're testing: nuance.
Think about your answer first, then open it.