The service-registry pattern
We know that microservices are exposed via access protocols such as HTTP/REST. This means that the services are accessed via a URL. However, we are in the cloud world, which has elastic scalability. The IPs of containers and virtual machines are dynamic and can change frequently. Consequently, the locations of services residing in these containers are also subject to change. As we have already said, instances of microservices are created and terminated constantly. Therefore, the following question arises—how can a client of a microservice handle this problem? The solution is to implement the service registry pattern. A service registry is a database of registered services. When a microservice is born, it is recorded ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access