The need for Service Discovery in the microservices architecture

As we know, in the microservices architecture, various protocols may be used for connecting services to each other. But how do these services find each other?

And also, one service may have multiple instances. So, what happens if we run multiple instances? Let's look at the following diagram:

As you can see, there are two services running in this microservices-based application—Account Service and Customer Service. Account Service requests Customer Service to fetch records of a customer in JSON format. And both services have their own DB access—Account DB and Customer DB, respectively. ...

Get Mastering Spring Boot 2.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.