Workings of Name server

The Name server is an ideal solution for the preceding situation. The following diagram shows how Name servers work:

All microservices (different microservices and all their instances) will register themselves with the Name server as each microservice starts up. When a service consumer wants to get the location of a specific microservice, it requests the Name server.

A unique microservice ID is assigned to each microservice. This is used as a key in the register request and the lookup request.

Microservices can automatically register and unregister themselves. Whenever a service consumer looks up the Name server with ...

Get Mastering Spring 5.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.