Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ZooKeeper alternatives? (cluster coordination service) [closed]

ZooKeeper is a highly available coordination service for data centers. It originated in the Hadoop project. One can implement locking, fail over, leader election, group membership and other coordination issues on top of it. Are there any alternatives to ZooKeeper? (free software of course)

like image 872
Thomas Koch Avatar asked May 18 '11 16:05

Thomas Koch


People also ask

What has replaced ZooKeeper?

Today that access has been replaced by talking with the brokers instead. The main reason this was done was to reduce the read/write load on the ZooKeeper servers.

Is ZooKeeper a cluster manager?

Zookeeper Cluster Manager. This is a cluster manager implementation for Vert.

How does a ZooKeeper watcher work?

Watches are maintained locally at the ZooKeeper server to which the client is connected. This allows watches to be light weight to set, maintain, and dispatch. When a client connects to a new server, the watch will be triggered for any session events. Watches will not be received while disconnected from a server.

What is cluster in ZooKeeper?

Zookeeper cluster is called as ensemble. For a cluster to be always up and running, majority of the nodes in the cluster should be up. So, it is always recommended to run zookeeper cluster in odd number of servers. For example, cluster with 3 nodes, or cluster with 5 nodes, etc.


1 Answers

I've looked extensively at Zookeeper/Curator, Eureka, etcd, and consul. Zookeeper/Curator and Eureka are in many ways the most polished and easiest to integrate if you are in the Java world. Etcd is pretty cool and very flexible, but It is really just a HA key store so you would have to write a lot of code to turn it into an opinionated service discovery system.

Consul is (to me) the best of both worlds. It is an opinionated service discovery system written on top of serf, using raft for cluster consensus and gossip for communication. It exposes the discovery / registration endpoints with a well documented REST api, and also allows you to discover services with DNS SRV records, and register services with configuration (i.e. so you can register a database or application you can't integrate a client with, or if you just want to keep your service discovery decoupled from your app)

I've written a blog post about consul where you can learn more and walk through my "try it out" demo

I've also discussed service discovery with etcd & docker if you want to see more about what that custom code might look like.

One last thing! etcd & consul are written in go, so maintaining them is much easier then java solutions like zookeeper. All you need is the consul / etcd binary. no dependencies, no linked libraries, no jvm.

like image 137
ben schwartz Avatar answered Sep 28 '22 05:09

ben schwartz