I'm considering using Zookeeper to manage shared configuration across multiple services that live on a single application server. Usage would be very low volume, mostly reads. My production system uses 2 VMs: one application server and one database server.
Zookeeper docs suggest that, in production, you want an ensemble of at least 3 instances.
I have two obvious options:
- Install two Zookeeper instances on one of the two VMs, and one on the other.
- Use only one Zookeeper instance.
If I only use one instance, and I can live with some downtime if Zookeeper happens to go down (which I would hope only occurs rarely), are there serious risks with only using one instance? When maintaining the server I'd be bringing Zookeeper down regardless.
There is the possible issue of file corruption in the data folder. Are additional instances required to recover in this scenario? Or can one simply delete the most recent snapshot and fall back to the previous one (with possible data loss)?
Can anyone speak to the risks involved? How bad an idea is this?