When the network splits the machines into groups that cannot talk to each other.
A network partition happens when the network breaks so that the machines in a system are split into groups that can not talk to each other. Each group is still running, but it can not see the others.
Imagine a database with five nodes in two data centres. One day the link between the data centres is cut. All five machines are healthy, and each data centre still works inside. But the three nodes in one data centre can not reach the two nodes in the other.
This is a partition. The important point is that it is not a crash. A crashed machine is silent and so is a cut-off machine, so from the outside you can not tell them apart.
Partitions are not rare events from textbooks. Real networks have bad switches, mistaken config pushes, overloaded links, cloud zones losing contact and even a single long pause that makes a machine look gone. Treat them as something that will happen.
| Kind | What happens | Example |
|---|---|---|
| Clean split | Two groups, each fully connected inside | Link between two data centres is cut |
| Isolated node | One node is cut off from all others | A machine's network card fails |
| Partial (asymmetric) | A can reach B, but B can not reach A, or A sees C but B does not | A bad firewall rule, a flaky switch |
| Client cut off | Clients can not reach servers, but servers talk to each other fine | Users' internet or a load balancer problem |
| Slow, not cut | Messages arrive, but so late that timeouts fire | Overloaded link, long GC pause |
| Method | How it works | Risk |
|---|---|---|
| Last write wins | Keep the write with the latest timestamp | A real write is silently lost, and clocks may be wrong |
| Version vectors | Track history, find which writes truly conflict | The app may have to resolve the conflicts |
| CRDTs | Data types that always merge without conflict | Only some data fits, such as counters and sets |
| Ask the user | Show both versions and let a human choose | Annoying, but nothing is lost |
A simplified model with one value and two groups. Real systems have timeouts, many keys and smarter merging than last-write-wins, but the choice is the same: refuse some requests, or risk disagreement.
| Term | Meaning in easy words |
|---|---|
| Network partition | A network failure that splits nodes into groups that can not reach each other |
| Quorum | The minimum number of nodes (usually a majority) that must agree for an action |
| Majority | More than half of all nodes |
| Minority | A group with half or fewer of the nodes |
| CP system | Keeps data consistent during a partition and may refuse requests |
| AP system | Keeps answering during a partition and may return old or conflicting data |
| Reconciliation | Merging different versions of data after the network heals |
| Last write wins (LWW) | A merge rule: keep the write with the newest timestamp |
| Asymmetric partition | A can reach B, but B can not reach A |
| Split brain | Both sides of a partition act as the leader |
| Healing | The moment the network works again and the groups can talk |
| Choice | We gain | We lose |
|---|---|---|
| Refuse writes without a majority (CP) | No conflicting data | The minority side is unavailable |
| Accept writes everywhere (AP) | Always answers, good for offline use | Conflicts to merge, risk of lost writes |
| Short failure timeout | Reacts fast to real partitions | False alarms when the network is only slow |
| Long failure timeout | Fewer false alarms | Long delay before the system reacts |
| Last write wins | Simple | Silent data loss and clock problems |
| More zones and nodes | Survives bigger failures | More cost and more to coordinate |