A Service Registry is a database of the locations of service instances. The service instances are registered with the registry service upon startup and are de-registered automatically upon shutdown. Netflix provides a registry service server, which is Eureka. Spring Boot provides integration with the Netflix API, so we can easily implement a microservice registry using Netflix's Eureka server.
The client service, or external routers, makes a query to find the available instances of a service. The registry server provides all of the available instances of the requested service. Take a look at the following diagram, which shows Service Registry and discovery with Eureka:
![](https://static.packt-cdn.com/products/9781789133608/graphics/assets/64d50cb2-86a8-4902-80d0-b194a60f5d22.png)
As you can see, all services register with the Eureka server to make themselves available. In the following section, we'll look at how to register services...