The CAP theorem forces distributed systems to trade off between consistency, availability, and partition tolerance, and real-world architecture decisions often favor availability and partition tolerance over strict consistency when user experience during outages matters most.
Key Points: • Partition tolerance is generally non-negotiable in real distributed systems, since network partitions will happen. • Choosing availability means the system keeps responding even if some nodes are unreachable, accepting temporary staleness. • Choosing consistency means requests may be rejected or delayed until all nodes agree, at the cost of responsiveness. • E-commerce systems commonly favor availability during high-traffic events, tolerating brief inventory inconsistency to avoid downtime. • Eventual consistency models let the system reconcile data after the fact once partitions heal.
Example: During a flash sale, an e-commerce platform kept the checkout flow available even when some inventory nodes were unreachable, briefly showing stock that had just sold out rather than blocking purchases entirely, then reconciled the discrepancy afterward.
Interview Tip: A concise interview answer is:
"On an e-commerce platform during peak sale traffic, I prioritized availability and partition tolerance over strict consistency, since keeping checkout responsive mattered more than momentarily accurate stock counts. Minor inconsistencies like showing recently sold-out stock were acceptable and got reconciled afterward, but downtime was not."