liveBook · Manning

Service registry

As explained in Microservices Patterns, Second Edition

A service registry is a database that records the network locations of service instances.

A service registry is a database of service instances’ network locations. It supports service discovery when addresses and available instances change dynamically, as they can with autoscaling, failures, and upgrades. section 8.2.5

In application-level discovery, the registry coordinates two steps:

  • Service instances register their network locations. section 8.2.5
  • Clients query the registry for available instances, then send requests to one of them. section 8.2.5
Figure 8.11 The platform is responsible for service registration, discovery, and request routing. Service instances are registered with the service registry by the registrar. Each service has a network location, a DNS name/virtual IP address. A client makes a request to the service’s network location. The router queries the service registry and load balances requests across the available service instances.
PlatformProvidedServiceDiscovery

Shows platform-managed registration and discovery, with a router querying the registry and load-balancing requests across available instances. section 8.2.5

Application-level registries include Eureka, Consul, and ZooKeeper. Modern deployment platforms such as Kubernetes often provide discovery, so teams may not need to implement it in the application. section 8.2.5

How Microservices Patterns, Second Edition covers it

How deep it goes
Defines the registry and request flow, then contrasts application-level discovery with platform-provided discovery.
Examples
Uses service instances registering locations, clients querying for instances, and a platform router balancing requests.
What it assumes
Assumes familiarity with distributed systems or microservices and dynamically changing service locations.
What you can do after
Understand how clients find service instances through an application-level registry or platform-provided discovery.
How it connects
Connects service registries to service discovery, microservices, Kubernetes, Eureka, Consul, and ZooKeeper.

Also explained in

Compare how 2 books explain service registry →

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.