You need a service registry where you store service information

Service discovery consists of three parts. 

You need a process that will register new services and de-register those that you stop. Finally, you need a way to retrieve service information. For example, when you deploy a new release, the registration process should store the IP address and port in the service registry. The proxy can later discover that information and use it to reconfigure itself. Some of the commonly used service registries are etcdConsul, and ZooKeeper. You can use Registrator for registering and de-registering services and confd and Consul Template for service discovery and templating.

Featured Post

US Tech Companies Reconsider Saudi Investment

The controversy over the death of Saudi Arabian journalist Jamal Khashoggi has shined a harsh light on the growing financial ties between Si...