Zookeeper on 2 or more nodes?

It is customary to run a cluster on 3 or more nodes in order to gain a significant performance or storage size boost relative to a single machine.
There is nothing that prevents you, however, from running on 2 nodes or even on just one node.
Running ZK on two nodes is fine. You will lose the HA-ness of ZK, and ZK will freeze if you lose a single node (because one is not more than half of two). Any of the following options are plausible

(a) running ZK on a single node. Losing the ZK node is a medium big deal, but not massive. Restarting with a new ZK is pretty easy and since there won't be any question of whether the remaining machine is current, you will be fine.

(b) running ZK on two nodes. This requires a ZK reconfig after one node crashes. That isn't so different from (a)

(c) running ZK on two nodes with a little bit on a third node. This works really well (if you can sneak the third ZK onto somebody's machine.
If failover isn't required (as in a dev or demo environment), I would recommend (a) for simplicity.

(c) running ZK on a third node that you steal a little bit of resources from.

TedDunning ♦♦



http://answers.mapr.com/answer_link/96/