When service instances have changing network locations, application-level service discovery lets services and clients use a dedicated registry instead of hardcoded addresses. Each instance registers its location; a client queries the registry for available instances, then sends a request to one. section 8.2.5
The interaction has two responsibilities:
- Service instances register their network locations and may provide a health-check URL. section 8.2.5
- Clients query the registry and send requests to one of the listed instances. section 8.2.5
Dedicated registries such as Eureka, Consul, and ZooKeeper were used for this approach. Modern deployment platforms such as Kubernetes largely automate discovery, so most teams no longer need to implement it in applications. section 8.2.5
Figure 8.10 The service registry keeps track of the service instances. Clients query the service registry to find network locations of available service instances.
Shows the registry tracking service instances and clients querying it for their network locations. section 8.2.5
