Microservices In Practice: Developing Instagram Clone —Discovery Service

Amr Saleh
Javarevisited
Published in
2 min readJun 12, 2020

--

This is part 2 of Developing Instagram Clone series, other parts are linked below

  1. Developing Instagram Clone: Introduction.
  2. Developing Instagram Clone: Discovery Service.
  3. Developing Instagram Clone: Auth Service
  4. Developing Instagram Clone: Media Service.
  5. Developing Instagram Clone: Post Service.
  6. Developing Instagram Clone: Graph Service.
  7. Developing Instagram Clone: Newsfeed Service.
  8. Developing Instagram Clone: Gateway Service.
  9. 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…

--

--

Amr Saleh
Javarevisited

I’m a software engineer who is passionate about software architecture and design. Enjoy coding in Java, Scala, and JavaScript.