zookeeper as a service registry

9.4k Views Asked by At

I want to use the ZooKeeper as a service registry which replicated identical services can register themselves and clients may discover available services's url to call them. As a starter to ZooKeeper I need the basic java code for registering and discovering the services on ZooKeeper.

1

There are 1 best solutions below

6
On

Check out Curator Discovery (part of Apache Curator), a Zookeeper-based service registry written in Java.

In SOA/distributed systems, services need to find each other. i.e. a web service might need to find a caching service, etc. DNS can be used for this but it is nowhere near flexible enough for services that are constantly changing. A Service Discovery system provides a mechanism for:

  • Services to register their availability
  • Locating a single instance of a particular service
  • Notifying when the instances of a service change