Types of Service Discovery

There are two types of Service Discovery

  • Client-Side Service Discovery
  • Server-Side Service Discovery

In this article, we are going to explain Server-Side Service Discovery.

Server Side Service Discovery in Microservices

Microservices are small, loosely coupled distributed services. Microservices architecture evolved as a solution to the scalability, independently deployable, and innovation challenges with Monolithic Architecture. It provides us to take a big application and break it into efficiently manageable small components with some specified responsibilities. It is considered the building block of modern applications. Before understanding What is Service Discovery let’s understand what is the need for Service Discovery in Microservices.

Similar Reads

What’s Service Discovery in Microservices?

Suppose we have Service-A & Service-B and we have our Load Balancer placed inside a different server. Now let’s introduce our Discovery Service. Now what this discovery service will do now whenever Service-A and Service-B want to communicate with each other then whenever we are starting our Microservices we’ll be registering them with Discovery Service. And this discovery service right now will know what is the IP and port number of Service-A and what is the IP and port number of Service-B. All detailed information will be there with Discovery Service. Similarly, if we have many different instances of Service-B, all this Service-B which is running in different servers will be registering their information with Discovery Service. So it is one central location where we’ll be managing our host and the port number information inside this particular server. This is basically called registration because all the services whenever they are starting off they are registering themselves with the discovery service and now the discovery service is maintaining all their information inside a particular map or a list or a database. We called it a Service Registry....

Types of Service Discovery

There are two types of Service Discovery...

Server Side Service Discovery in Microservices

So, the example we have taken above we call it as Server-Side Discovery. The entire concept is called a Server-Side Discovery. Why so? Let’s understand it step by step....