When to Choose CP vs AP
CHOOSE CP WHEN MISTAKES ARE EXPENSIVE
Financial transactions: Bank balances, payments. Duplicate charges violate regulations and cost money.
Inventory and bookings: Concert tickets, hotel rooms. Overselling creates customer service nightmares.
Configuration: Feature flags. Inconsistent configs across servers can break functionality.
CHOOSE AP WHEN SPEED TRUMPS ACCURACY
Social feeds: Users want something in under 200ms. Missing recent posts temporarily is acceptable.
Search and recommendations: Slightly stale results beat nothing. 2 second index lag is invisible.
Analytics: Aggregations lagging by seconds is preferable to blocking writes.
THE NUMBERS
Payment service at 50K TPS: CP gives 75ms p99 writes, 40% error rate during partitions. AP gives 5ms p99 but may create duplicates. For payments, occasional errors beat complex reconciliation.