There they are, three little Intel NUCs. They’ve lived their lives as desktop computers. Unfortunately, they’re no longer suitable for running Windows 11. That’s why they ended up with me. It wasn’t hard for me to come up with a new purpose for them: a Kubernetes cluster.
I’m looking at the three computers now, but why do I actually need three? For a distributed system, wouldn’t two computers be enough?
Correct, for a distributed system or even a “cluster,” two nodes are sufficient. In fact, you can run a Kubernetes “cluster” on just 1 node. The confusion comes from the fact that you probably want to reach a quorum to run etcd.
Etcd is a distributed, strongly consistent key-value store that serves as the authoritative, fault-tolerant source of cluster state for Kubernetes.
Let’s break that down...
Distributed means the data is replicated across multiple nodes
Strongly consistent means everyone sees the most recent successful write
Fault-tolerant source means it continues to operate even if a node crashes
That last characteristic requires you to have a quorum—in other words, a minimum number of voters needed to reach a decision.
And that’s the answer to my question of why I need three computers. With three nodes, I have a quorum of two and fault tolerance of one. One node can fail, and the remaining two still form a majority and can make decisions. This is the minimum needed to perform an update to the host operating system while the other two nodes keep running and can still make decisions.
I hope you enjoyed my first blog about distributed computing. In the coming period, I’ll be experimenting with these little NUCs and we’ll discover the various ways distributed computing can fail. Also I haven't answered what happens in practice when the quorum can't be reached.
Oh and I must admit, though—I’ve cheated a little. While writing this blog, I actually only own two Intel NUCs. But luckily, with the power of AI, I was able to generate an image with three stacked on top of each other. Wish me luck in finding a third one!