# Synchronous and Asynchronous Processing

A distinction between waiting for work to finish in the current interaction and allowing it to complete independently later.

- Type: framework
- Domain: Engineering & architecture
- Level: Foundational
- Last reviewed: 2026-09-24
- Original: [Soroush’s Product Wiki](<https://wiki.soroush.uk/topic/synchronous-and-asynchronous-processing/>)

## What it means

Synchronous processing makes a caller wait for an operation's result before it can continue along that path. Asynchronous processing accepts or starts work and allows the caller to continue before final completion, with the outcome delivered through polling, notification, a callback, a message, or later retrieval. Asynchronous does not necessarily mean parallel.

## Why it matters

The choice shapes product feedback, latency, reliability, and system coupling. Synchronous flows offer immediate certainty but hold resources and propagate delays; asynchronous flows can absorb slow work and failures but require explicit pending, success, failure, and recovery states.

## When to use it

Use synchronous processing when the next user or system action requires an immediate, bounded result. Use asynchronous processing for long-running, bursty, retryable, or independently scalable work. Do not add asynchrony when its state management and operational cost exceed the latency benefit.

## How it works

1. Identify whether the caller needs final completion or only durable acceptance before proceeding.
2. For synchronous work, bound the wait with a timeout and return a definitive result or error.
3. For asynchronous work, persist a job or message and return an identifier and pending state.
4. Process the work independently with retry, idempotency, and capacity controls.
5. Communicate completion, failure, progress, and cancellation through an appropriate channel.
6. Measure end-to-end completion time rather than only the initial acknowledgement.

## A practical example

Account validation stays synchronous because signup cannot continue without it. Exporting a year's activity becomes asynchronous: the API returns a job ID, the interface shows progress, and a notification links to the file after a worker finishes.

## Where it breaks

Synchronous chains can suffer cascading latency and failure. Asynchronous workflows introduce eventual consistency, duplicate work, delayed feedback, and more complex testing and support. Moving work to a queue does not remove its capacity cost.

## Common mistakes

- Calling work asynchronous merely because its implementation uses multiple threads.
- Returning success for asynchronous work without distinguishing acceptance from completion.
- Keeping long external calls synchronous without deadlines or cancellation.
- Adding a queue while omitting user-visible progress and terminal failure handling.

## Visualization

[View the visualization on the website](<https://wiki.soroush.uk/topic/synchronous-and-asynchronous-processing/#visualization-synchronous-and-asynchronous-processing>)

## Sources

1. [Synchronous and Asynchronous Requests](<https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest_API/Synchronous_and_Asynchronous_Requests>) — Web APIs — MDN · Technical documentation
2. [Asynchronous Communication](<https://docs.aws.amazon.com/prescriptive-guidance/latest/modernization-integrating-microservices/asynchronous.html>) — AWS Prescriptive Guidance · Institutional architecture guide

## Related topics

- [Request and Response](<https://wiki.soroush.uk/topic/request-and-response/>)
- [Background Job](<https://wiki.soroush.uk/topic/background-job/>)
- [Concurrency and Parallelism](<https://wiki.soroush.uk/topic/concurrency-and-parallelism/>)
