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

AP Systems: Availability and Partition Tolerance

Exploring systems that remain available during partitions but may serve stale or inconsistent data.

AP Systems: Availability and Partition Tolerance

You'll learn how AP systems prioritize responding to every request even when network failures split the system, trading consistency for continuous operation.

The AP Choice

When a network partition occurs (nodes can't communicate), an AP system chooses to remain Available rather than shut down or refuse requests. Every reachable node continues serving reads and writes, even though they can't coordinate with other nodes. This means you might get stale or conflicting data, but you'll always get some answer.

How It Works

Imagine a social media platform with data centers in New York and London. When the transatlantic cable fails (partition), an AP system lets both centers keep accepting posts and likes. New York users see updates from New York; London users see London updates. Neither side blocks waiting for the other. When the network heals, the system reconciles conflicts—perhaps keeping both versions or using timestamps to merge.

The key principle: "It's better to give an answer that might be outdated than to give no answer at all."

Real-World Examples

  • DNS: Always returns some IP address, even if it's cached and slightly stale
  • Shopping cart services: Let you add items even during backend issues
  • Social media feeds: Show you posts even if some recent ones are delayed

The Trade-off

AP systems sacrifice strong consistency (lesson 2601). During a partition, different nodes may have different views of the data. Users might see different friend counts, inventory levels, or comment threads depending on which node they reach.

Key Takeaway: AP systems keep the doors open during network failures, accepting that users may temporarily see inconsistent or stale data—prioritizing service continuity over perfect accuracy.