Can we use zookeeper for implementing consistent hashing? I want to maintain my hashring of servers with zookeeper so that their health can be monitored and the logic of mapping a given key to particular server with zookeeper. But since zookeeper needs a leader(as I read), then who can be a leader here in my case?Is it possible to have leader-less set up of zookeeper just for health monitoring?Do I need a leader?
Here is flow I am thinking of :
No, you do not need a leader what you think. Zookeeper will evict a leader to process requests by itself, based on the consensus algorithm ZAB.
Moreover, you could use ZK to manage a list of nodes, known as group membership