What is Spring cloud Netflix Eureka Discovery Service in Microservice Architecture
In this tutorial we are going to learn briefly about Eureka Discovery service.
It is also referred to as Spring cloud Netflix Eureka because Eureka is a project built by Netflix for its own needs and later Eureka project has become a part of Spring Cloud due to which it is not only used by Netflix, but also by thousands of other developers across the globe.
What does Eureka do?
Eureka helps the Microservices find each other.
Let’s say we have client application called Mobile App and a Micro service called as Products. If client application wants to communicate with the Products application, client application must know the address of the product’s microservice.
We can hard code the product microservice address in the client application, so that client application can communicate with the product microservice.
Now the problem statement arises that if product microservices must be scaled up and start more instances of the product microservices?
Note that each additional instance of the product microservices will need to start up in its own port number which means that each instance has different addresses and mobile application fails to communicate with these newly created instances.
Here comes the Eureka discovery service, when a new instance of product microservices is created. It will register automatically with Eureka discovery service and Eureka will know the addresses of all the newly created instances where the HTTP requests are recieved from the client application through the API gateway and also load balanced automatically.