1.

How should microservices communicate with each other?

Answer»

It is an important design DECISION. The communication between services might or might not be necessary. It can happen synchronously or asynchronously. It can happen SEQUENTIALLY or it can happen in parallel. So, once we have decided what should be our communication mechanism, we can decide the technology which suits the best.

Here are some of the EXAMPLES which you can consider.

  • Communication can be done by using some queuing service LIKE rabbitmq, activemq and kafka. This is called asynchronous communication.
  • Direct API calls can also be made to microservice. With this approach, interservice DEPENDENCY increases. This is called synchronous communication.
  • Webhooks to push data to connected clients/services.


Discussion

No Comment Found