Sync vs Async Communication By David Boyne

Sync vs Async Communication By David Boyne

Sync vs Async Communication

When we design our architecture and build our services it can be useful to know the different types of communication patterns. Although pretty simple, I think it’s important to know the difference between sync and async.

Sync

  • Normally seen as the “request/response” pattern. Example would be taking a phone call, you need both parties there.
  • An example of this could be a command, many API calls want something to happen.
  • Fails fast, simple and low latency
  • What happens when many requests come in? Need to scale the service, could you use Async pattern instead? Something to consider.

Async

  • With EDA a producer can fire an event and forget it and allow downstream consumers to process it (if they want…)
  • With messages, a message could be added to queue and downstream services control the speed of injestion and process async.
  • Async provides a loose coupling between services/systems.
  • Receiver can control the rate of consumption of events/messages
  • Example of this would be Amazon SQS.

Extra resources

Download EDA Visuals

Join over 8,000 others learning EDA and download all the EDA visuals directly to your computer. This document updates everytime a new visual is added so make sure you come back to get the latest.

Download now →
Diagrams and thoughts by @boyney123 to help you learn.