By popular demand, the Valentine's Day Offer has been extended to the weekend Flat 25% off on all courses. Use coupon code VDAY25 During checkoutEnroll Now
== Use case - 1 ==
Let us say there are many servers which can respond to your request and there are many clients which might want the service. From time to time some of the servers will keep going down. How can all of the clients can keep track of the available servers?
It is very easy using ZooKeeper as a central agency. Each server will create their own ephermal znode under a particular znode say "/servers". The clients would simply query zookeeper for the most recent list of servers.
Lets take a case of two servers and a client. The two server duck and cow created their ephermal nodes under "/servers" znode. The client would simply discover the alive servers cow and duck using command ls /servers.
Say, a server called "duck" is down, the ephermal node will disappear from /servers znode and hence next time the client comes and queries it would only get "cow".
So, the coordinations has been made heavily simplified and made efficient because of ZooKeeper.
Taking you to the next exercise in seconds...