As the name suggests, Service Discovery (SD) allows for automatically detecting instances of specific services in a computer network. Instead of hardcoding a domain name or IP where the service should be hosted, the caller must only be pointed to a service registry. Using this approach, your architecture gets a lot more flexible, as now all the services you use can be easily found. If you design a microservice-based architecture, introducing SD really goes a long way.
There are several approaches to SD. In client-side discovery, the caller contacts the SD instance directly. Each service instance has a registry client, which registers and de-registers the instance, handles heartbeats, and others. While quite straightforward, in this approach, each client has to implement the service discovery logic. Netflix Eureka is an example of a service registry commonly used in this approach.
An alternative is to use server-side discovery. Here, a service registry is also...