Microservices In Practice: Developing Instagram Clone —Discovery Service
This is part 2 of Developing Instagram Clone series, other parts are linked below
- Developing Instagram Clone: Introduction.
- Developing Instagram Clone: Discovery Service.
- Developing Instagram Clone: Auth Service
- Developing Instagram Clone: Media Service.
- Developing Instagram Clone: Post Service.
- Developing Instagram Clone: Graph Service.
- Developing Instagram Clone: Newsfeed Service.
- Developing Instagram Clone: Gateway Service.
- Developing Instagram Clone: Front-end Service
Service Discovery
In microservices architecture services need a way to find each other, you can’t rely on service IP and port, because those are dynamic, whenever an IP or a port of a service changes you’ll need to modify the code in all other services.
To avoid this we need a place where services can register itself and assign it a name, this place is “service discovery”, You can think of service discovery as DNS, it maps service IP and port to a name.
We will be using Spring Cloud Netflix Eureka, the reason I will not go deep into this is…