liveBook · Manning

Client-side discovery

As explained in Microservices Patterns, Second Edition

Client-side discovery is a service discovery pattern in which a client retrieves service instances from a registry and selects one for a request.

When service instances have changing network locations, clients can query a service registry instead of relying on fixed addresses. The client selects an available instance and sends the request directly to it. section 8.2.5

The client-side flow has three responsibilities:

  • Retrieve available service instances from the registry; optionally cache the list. section 8.2.5
  • Choose an instance using a load-balancing algorithm, such as round-robin or random selection. section 8.2.5
  • Send the request to the selected instance. Netflix Eureka and Ribbon, and Spring Cloud integrations, support application-level discovery. 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.
ApplicationLevelServiceDiscovery

Shows how clients query a registry for available service instances’ network locations. section 8.2.5

How Microservices Patterns, Second Edition covers it

How deep it goes
Defines the registry-query and selection flow, including optional caching and round-robin or random algorithms.
Examples
Names Eureka, Ribbon, and Spring Cloud as application-level discovery components.
What you can do after
Apply it via Eureka clients, Ribbon, or Spring Cloud to discover and select service instances.
How it connects
Connects service registries, load balancing, self-registration, and application-level service discovery.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Microservices Patterns, Second Edition. The section links point to the parts of the book it draws on.