Scaling Writes hard
In Cassandra, if a replica node is down during a write, the coordinator stores a 'Hint'. What trade-off does this represent?
- A Availability over Consistency: The write succeeds immediately (stored on a neighbor), but subsequent reads might not see the data until the hint is replayed.
- B Consistency over Availability.
- C Partition Tolerance over Latency.
- D Durability over Speed.
Answer: A. Availability over Consistency: The write succeeds immediately (stored on a neighbor), but subsequent reads might not see the data until the hint is replayed.
Hinted Handoff makes the system 'Always Writable' (AP). You accept that the data is durably stored *somewhere*, even if not on the correct node yet, sacrificing immediate consistency for uptime.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- What does the 'Atomicity' property in a database transaction guarantee regarding writes?
- Your database is struggling with write traffic. You decide to 'Scale Up' (Vertical Scaling) by buying a bigger server. What is the eventual hard limit of this strategy?
- A developer sets up a 'Fire-and-Forget' write pattern (sending data without waiting for a database confirmation) to speed up the app. What is the major risk?
- Why is inserting 1,000 rows in a single 'Batch' query faster than executing 1,000 separate `INSERT` queries?
- In the Raft consensus algorithm, what mechanism prevents a 'Split Vote' (where no leader gets a majority) from stalling the cluster indefinitely?
- Your 'Logs' table has 10 billion rows and writes are getting slow. You barely access logs older than 1 year. What is the simplest strategy to improve performance?