I don’t think you need a third data Center. You can still go with 2 DC with 3 and 2 ZK nodes. A cluster with 5 nodes. You can keep 1 node in each dc as observer node. This will make sure only 3 nodes are participating in leader election process and hence a quorum of 3 will work.
On Mon, 24 Jul 2023 at 2:58 PM, <josef.zahn...@swisscom.com> wrote: > Hi guys > > Today we have just one datacenter with a few NiFi clusters, so we use a > dedicated 3-node zookeeper cluster in that datacenter. We are now planning > to expand to another datacenter, so we would like to split the NiFi nodes > as well as zookeeper nodes to the two datacenters. However 2 zookeeper > nodes is not a good quorum number, so we had the idea to do the following > regarding zookeeper: > > - Datacenter 1: 2 zookeeper nodes > - Datacenter 2: 2 zookeeper nodes > - Location 3 (another small DC): 1 zookeper node -> no NiFis > > All locations are connected via dark fiber, however the third location is > bit more far away from the others (everything withing 100km). Now, as we > anyway split the NiFi clusters over the two datacenters. Shall we limit the > NiFi zookeeper client (state-management.xml) to the zookeeper nodes located > within the same datacenter? Any comments to our design idea? What’s the > best way to configure zookeeper clients in a way that local (same > datacenter) zookeepers are preferred? > > Any other ideas how we should configure this related to zookeeper? Shall > we use just one zookeeper per location and distribute the load over all 3 > nodes/datacenters evenly? This would then cause load between the > datacenters under normal circumstances… > > Cheers Josef > > > > >