From the course: Azure Microservices with .NET Core for Developers

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Communication between microservices

Communication between microservices - Azure Tutorial

From the course: Azure Microservices with .NET Core for Developers

Start my 1-month free trial

Communication between microservices

In our microservices architecture, you'll need to communicate from one service to another. There are two main ways to do this. Synchronously or asynchronously. With the synchronous mechanism, the service to which we are going to communicate exposes an API which knows in advance this service that initiates the communication. Generally, this happens through the HTTP protocol. However this mechanism is not limited in any way to that protocol. One of the main advantages of this method is that it's very simple. However in practice, there are a few drawbacks. Services might be running on different servers. So service A might be calling service B across the network. It can cause some challenges with the scaling. If service B is still working, service A will get caught up waiting for it. You should also consider implementing resilience straits in your application, to retry communication in case of failure…

Contents