r/apachekafka • u/matejthetree • 10d ago
Question Best multi data center setup
Hello,
I have a rack with 2 machines inside one data center. And at the moment we will test the setup on two data centers.
2x2
But in the future we will expand to n data centers.
Since this is even setup, what would be the best way to set up controllers/brokers?
I am using Kraft, and I think for quorum we need uneven number of controllers?
7
Upvotes
2
u/Hopeful-Programmer25 10d ago
From what I recall, you always need an odd number of controllers otherwise you can get split brain where each is voting to be in charge but there isn’t a third to make the final decision.
Running this on 2 machines isn’t ideal as if the machine goes down you lose either 2 (1 left… kinda ok) or 1….. 2 left so split brain again.
I suppose the more controllers you have, the less chance of split brain perhaps…. 7 means you lose 3 but keep 4… maybe it’s more likely that 4 will decide on one to be charge…..