← Lessons

quiz vs the machine

Gold1380

System Design

Network Partition Handling

When the network splits, you must choose what to give up.

5 min read · core · beat Gold to climb

What a partition is

A network partition is when links break and nodes split into groups that cannot talk to each other, even though each group is alive. Partitions are not rare; they happen on every large network.

The CAP forcing function

During a partition you cannot have both consistency and availability. You must pick:

  • CP reject or block writes on the minority side to stay consistent
  • AP keep serving on both sides and reconcile later

This is not a free choice; it follows from the laws of the system.

Detecting partitions

  • Heartbeats stop arriving from a group of peers
  • Quorum reads or writes start failing
  • A node sees itself isolated from the majority

Common strategies

  • Quorum majority lets the larger side keep working while the minority steps back
  • Fencing tokens stop a stale leader from acting after a split
  • Read repair and anti entropy reconcile divergent replicas afterward

A warning

The worst outcome is both sides believing they are authoritative and accepting conflicting writes. That is split brain, and partition handling exists largely to prevent it.

Key idea

A partition splits live nodes into isolated groups, and CAP forces you to sacrifice consistency or availability; quorums and fencing decide which side keeps working.

Check yourself

Answer to earn rating on the learn ladder.

1. During a network partition, CAP says you must give up which pair guarantee?

2. What does a quorum majority approach do during a partition?

3. What dangerous outcome does partition handling try to prevent?