SteelReed

Search

Search posts, questions…

MicroservicesQuestion 5 / 24

Middle

When should services call each other synchronously, and when asynchronously via messages?

Short answer

Go synchronous (REST/gRPC) when the caller needs the result now and the operation is short; go asynchronous (Kafka, RabbitMQ, webhooks) when the work can happen later, takes long, or many parties need to know. Async removes temporal coupling, at the cost of eventual consistency and handling duplicates and reordering.

yes, short operationcan happen latermany parties need itlong, third-party workCaller needs result now?Sync: REST, gRPCAsync: Kafka, RabbitMQQueue + webhook,processing

3 points to say:

  1. Sync when you need the result now; async when it can wait, takes long, or many parties need the same event.
  2. A sync chain multiplies availability (4 services at 99.9% → ~99.6%); async trades that for eventual consistency and must handle duplicates and reordering.
  3. A screen needing many sources → a read model; long work → queue + webhook and a "processing" status.

Keep reading the deep dive

Create a free account to read the full explanation and follow-up questions, mark questions as studied and review them on a schedule.