Here is one suggestion: - Put for example 3 zookeeper servers in each data center - For each data center, configure a group the following way:
``` # Data center 1 server.1=... server.2=... server.3=... # Data center 2 server.4=... server.5=... server.6=... group.1=1:2:3 group.2=4:5:6 ``` This configuration will guarantee that all updates are synchronously replicated, so in the case a data center goes down, you won't lose data. There is a trick, though. In the case one data center goes down, you'll need to reconfigure manually the following way. Say the data center for group one goes down. In this case, you'll have to manually change the configuration to: ``` ## Data center 1 #server.1=... #server.2=... #server.3=... # Data center 2 server.4=... server.5=... server.6=... #group.1=1:2:3 #group.2=4:5:6 ``` pretty much making group 2 the whole ensemble. Of course, this is not masking a data center going down, which is only possible if we have an odd number of data centers greater than two. I'm suggesting this workaround to make it possible with two data centers, but it requires a manual step upon failure. -Flavio > On 08 Dec 2016, at 18:16, Alvaro Gareppe <agare...@gmail.com> wrote: > > I have Zookeeper running in a PRD environment with 3 instances running. 2 > in 1 data center and 1 in other. But as zookeeper ensamble runs with a > majority if a loose the data center that runs 2 nodes of zookeeper, I loose > the cluster. > > Is there any way to configure zookeeper (even adding more nodes is an > option) to keep running if some of the data center is offline (any one of > them). The only restiction, of course, is the number of datacenters > > -- > Ing. Alvaro Gareppe > agare...@gmail.com