What is Service Discovery in Microservices?
Hello everyone. In this article, let's go through Service Discovery in Microservices architecture.
Monolithic Architecture
Before the advent of Microservices architecture, Monolithic architecture was predominant across the web. As seen from the picture above, lets us assume that this is the Monolith application that runs on a physical server on-premise. It has 3 servers and all of them have static IPs and the requests are routed to them using a load balancer. The IP of these 3 servers is stored in a config file usually and is read by the load balancer. In this case, there is no need for a Service Registry as the IP addresses of these 3 APP servers are fixed and won't change.
Microservices Architecture
In the case of a micro-service architecture that is deployed in the cloud, there will be a lot of microservice components for different services. Every microservice can scale differently based on the demands.
The Order service might have 4 or 5 instances and Billing Service might have 2 or 3 instances running. With each instance having a dynamic network address because of…