Course contentsShow
← Computer Science
Lesson 2621 of 2,87258. Distributed Systems BasicsFree lesson

Consistency vs Availability Tradeoffs

Explore how stronger consistency models reduce availability and vice versa in distributed systems.

Consistency vs Availability Tradeoffs

What you'll learn: You'll understand how choosing stronger consistency models forces you to sacrifice availability, and vice versa, in distributed systems.

The Fundamental Tension

In distributed systems, consistency and availability exist in tension with each other. When you strengthen your consistency guarantees, you typically reduce availability. When you maximize availability, you must weaken consistency guarantees.

Here's why: stronger consistency requires coordination. For linearizability (strong consistency), nodes must agree on operation order before responding. This coordination takes time and requires communication. If a network partition occurs or nodes become unreachable, the system must either:

  • Wait for consensus (sacrificing availability to maintain consistency)
  • Proceed with partial information (sacrificing consistency to maintain availability)

The Spectrum in Practice

Think of it like a sliding scale:

High Consistency ← → High Availability

  • Linearizability requires tight coordination → lower availability (system may refuse requests during partitions)
  • Sequential consistency allows some reordering → slightly better availability
  • Causal consistency only coordinates causally-related operations → more availability
  • Eventual consistency permits temporary divergence → maximum availability

Real-World Example

A banking system choosing strong consistency might reject withdrawal requests during network issues to prevent overdrafts. An AP system like a social media feed choosing eventual consistency stays available during partitions, accepting that users might temporarily see different versions of posts.

The tradeoff is rarely binary—it's about finding the right point on the spectrum for your use case. Critical financial data demands strong consistency despite availability costs. User preferences or shopping carts can tolerate eventual consistency for better availability.

Key Takeaway: Stronger consistency models reduce availability because they require more coordination between nodes; weaker models improve availability by tolerating temporary inconsistencies—choose based on your application's tolerance for stale data versus downtime.