Synchronous and Asynchronous Communication

Synchronous calls are easy to reason about: the caller waits for a response. They are appropriate when the user needs an immediate result, but latency and availability depend on the downstream path. If A calls B, which calls C, a slow C can consume resources in A and B.

Asynchronous communication lets a producer hand work to a broker or durable queue and continue. It improves burst absorption and decoupling, but requires retries, deduplication, dead-letter handling, event schemas, and a way to observe work that has not completed.

Set deadlines across a request chain. A downstream call should not be allowed to outlive the caller's remaining budget. Use asynchronous processing for tasks such as emails, analytics, and media transcoding when immediate completion is unnecessary.

Synchronous request versus asynchronous job
Key Takeaways
  • Synchronous paths couple latency and availability.
  • Queues buffer work but do not remove the need for correctness.
  • Expose job state when work completes asynchronously.