← Lessons

quiz vs the machine

Gold1350

System Design

Synchronous vs Asynchronous

Whether the caller waits for a result or hands off work and moves on.

5 min read · core · beat Gold to climb

Waiting or not

In a synchronous call the caller blocks until the work is done and the result returns. The flow is simple to reason about because the answer arrives in the same step that asked for it.

In an asynchronous call the caller hands off the work, often onto a queue, and continues without waiting. The result arrives later through a callback, an event, or by polling.

The trade

  • Synchronous coupling means the caller is only as fast and reliable as the slowest dependency. A slow service makes the caller slow too.
  • Asynchronous handoff decouples caller and worker, absorbs bursts in a queue, and survives a temporarily down worker, but it adds complexity around ordering, retries, and eventual results.

When to use which

  • Use synchronous when the user needs the answer now and the call is fast and reliable, like reading a profile.
  • Use asynchronous for slow, bursty, or failure prone work, like sending email, encoding video, or fanning out notifications.

A common pattern accepts a request synchronously, then does the heavy work asynchronously.

Key idea

Synchronous calls wait for a result and stay simple while asynchronous handoffs decouple work to gain resilience at the cost of complexity.

Check yourself

Answer to earn rating on the learn ladder.

1. What is a key advantage of asynchronous processing?

2. What is a downside of a synchronous call to a slow dependency?