Internet Computer

Why does an engine need 3f + 1 nodes to survive f failures?

All help topics

The Internet Computer's consensus is Byzantine fault tolerant: it stays correct even when some nodes lie rather than just stop, and that guarantee needs n ≥ 3f + 1 nodes to tolerate f bad ones.

What counts as a failure

A failure is any node that is offline, broken or compromised. Byzantine fault tolerance (BFT) covers nodes that send wrong or conflicting messages, not only nodes that go silent, which is why it needs more spare nodes than simple replication.

The numbers
  • f = floor((n − 1) / 3): 4 nodes tolerate 1 failure, 7 tolerate 2, 10 tolerate 3, 13 tolerate 4.
  • f only steps up at 4, 7, 10 and 13 nodes, so 5 or 6 nodes tolerate the same single failure as 4.
  • Below 4 nodes there is no fault tolerance at all.
What has to stay online

To finalize blocks, n − f nodes must be online and agree. With 7 nodes that is 5; with 5 nodes it is 4, not 3. With fewer, the engine stops: writes fail and it stops answering, but your apps and their data stay on the engine and come back once enough nodes return. With exactly n − f online, it can't lose another node.

Why independence matters as much as count
  • Nodes run by one provider share that provider's outages, mistakes or closure, so the console counts them as one for independence. Seven nodes from just two providers can't be counted on to survive one provider failing.
  • The same goes for data centers, countries and continents: nodes that share any of them share its failures. Four distinct units in a dimension are needed before a fault there is survivable.
Choosing a size
  • A new engine starts with 4 nodes (1 failure). 7 nodes (2 failures) and 10 (3) are targets you reach by adding nodes to the engine after it is created: the engine builder marks them Coming soon as starting sizes.
  • More nodes raise fault tolerance and read capacity. They don't add memory or write speed: that takes a larger node class.
Learn more
Still stuck? Contact support