Microservices Communication : Synchronous or Asynchronous

Naresh Waswani
Simpplr Technology

--

While working with Microservices Architecture style, one of the challenging things is to decide what should be the communication pattern between the microservices? Should I be using a synchronous way of communication OR should I go with an asynchronous communication style???

In this blog, we will cover both the ways of communication, doing trade-off analysis with the help of a business case.

Here is the business case that we will use for our blog —

The development team at Waswani Corp. has been asked to enhance their existing Feed system to add content moderation for all the feed posts to check for any offensive or bad words being used.

Well, the business requirement looks pretty straight forward.

The team did a quick analysis and came up with the solution mentioned below -

  1. Create a new Feed Moderation microservice.
  2. Integrate Feed microservice with Feed Moderation microservice using command based synchronous invocation.
Synchronous Communication between microservices

When asked why this solution, here is what they had to say —

  1. It is easy to model, reason about and visualize the data flow.
  2. The response from Feed…

--

--

Naresh Waswani
Simpplr Technology

#AWS #CloudArchitect #CloudMigration #Microservices #Mobility #IoT