Course contentsShow
← Computer Science
Lesson 2694 of 2,87260. Distributed Data and CommunicationFree lesson

Partition Tolerance and Fault Handling

Ensuring availability and consistency when partitions fail or become unreachable.

Partition Tolerance and Fault Handling

What you'll learn: How distributed systems maintain availability and consistency when network partitions isolate nodes from one another.

Understanding Network Partitions

A network partition occurs when communication links fail between groups of nodes in a distributed system, splitting the cluster into isolated "islands." Unlike a simple node crash, partitioned nodes are still running—they just can't talk to each other. This is one of the hardest failure modes to handle correctly.

Think of it like a restaurant chain where phone lines between locations go down. Each branch is still operational, but they can't coordinate about inventory or reservations. Do they keep serving customers independently (availability) or stop accepting orders until communication restores (consistency)?

Fault Handling Strategies

When partitions occur, systems must choose their response:

1. Reject writes on minority partitions (CP approach)

  • Only the partition with quorum majority accepts updates
  • Prevents split-brain scenarios where conflicting writes occur
  • Example: Raft refuses writes if leader can't reach majority

2. Accept writes everywhere (AP approach)

  • All partitions remain available for reads and writes
  • Requires conflict resolution when partition heals
  • Example: Using vector clocks or last-write-wins

3. Degraded mode

  • Read-only operations allowed during partition
  • Critical writes queued or rejected
  • Balances availability with safety

Partition Detection and Recovery

Systems detect partitions through:

  • Heartbeat timeouts between nodes
  • Quorum checks before operations
  • Monitoring connection health

Recovery involves reconciling divergent state through read repair, anti-entropy processes, or manual intervention for complex conflicts.

Key Takeaway: Partition tolerance means your system continues functioning despite network splits, but you must explicitly choose whether to prioritize consistency (reject operations) or availability (allow divergence) during the partition.