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

NGINX Unit is dynamically configured using a REST API

There is no static configuration file. All configuration changes happen directly in memory. Configuration changes take effect without requir...