-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Microservices with Go
By :

In the previous chapter, we created an application consisting of three microservices. The relationship between the services is illustrated in the following diagram:
Figure 3.1 – Relationship between our microservices
As you can see, the movie service calls both the metadata and rating service for fetching the complete movie details.
But how would our services send requests? How would they know the addresses of each other?
In our example, we used pre-programmed static values for the API handlers. The settings we used were as follows:
localhost:8081
localhost:8082
localhost:8083
In our approach, each service would need to know the exact address of the other services it would communicate with. This approach would work until we more than one instance of each microservice. In this case, we would have multiple challenges: