0% completed
System Design Trade-offs in Interviews
Interviewers almost never ask "what is the CAP theorem". They describe a system and wait to see whether you notice that a choice is being made.
This lesson is the five moves that turn the theory into an answer.
1. Ask the Question That Decides It
There is one question, and it settles most cases:
Is it worse for this system to show wrong data, or to show nothing at all?
Answer that and you have picked your letter.
A banking system cannot show a wrong balance. Somebody could spend money twice. It is better to make the user wait, so this leans CP.
.....
.....
.....
Sharath P
· 9 months ago
CP scenario (Consistency + Partition)
A financial ledger system that processes inter-bank transfers requires strict correctness even if the network splits. During a partition, the system must reject writes rather than risk divergent account balances. Reads must always return the most recent committed state from a majority quorum. After the partition heals, no reconciliation steps requiring human intervention should ever be needed because the system never allowed conflicting writes.
AP scenario (Availability + Partition)
A global social network feed service must keep accepting posts, likes, and profile updates even if regions lose connectivity. During a partition, all nodes must allow local writes using last-write-wins timestamps. Clients must always get a response, preferably
Reading Progress
0%