Synchronous vs Asynchronous Communication: When to Use Each

By Arkaitz

You have a call that works. Your service asks another for an answer, gets it, and moves on. Then someone on your team proposes a queue, because queues are what mature systems use. You cannot say what the queue buys or costs, so the argument turns into taste.

It is not taste: synchronous vs asynchronous communication is a decision I price with three inputs, and I have never found a fourth that changes the answer you get.

Choose synchronous communication when you need the answer to continue, the callee fits inside your deadline, and you can own the retry. Choose asynchronous communication when the answer can arrive later, the work must outlive your request, or peak arrival will exceed what your consumer can process. My rule is per interaction, not per system.

If you are still deciding where state lives and how copies agree, this is not your first problem; the six decisions that make a system distributed come first. Then you meet this decision on every endpoint you own.

Your synchronous design is cheaper, and it fails honestly. Asynchronous is more durable, and it fails quietly, hours later; I would rather defend the first in a design review than explain the second at 3 a.m.

What is the difference between synchronous and asynchronous communication?

Your synchronous interaction keeps the caller waiting for the result, so the caller owns the outcome. Your asynchronous interaction hands the request to something that owns the outcome after your request ends.

That definition is about who holds the state of your interaction, not HTTP, gRPC, or a broker. I build synchronous calls as local functions or HTTP requests, and asynchronous ones as queues, logs, or job tables that outlive the process. The transport follows the decision; it does not make it.

Question Synchronous Asynchronous
Where the answer goes You return it in the same interaction You send it to a status resource, a callback, or another consumer
Who waits You wait Nobody, or you wait later in the flow
Failure coupling Your availability includes the callee's You survive; the work is delayed or lost
Retry owner You The broker redelivers; your consumer owns the outcome
Load control Your blocking call applies backpressure The buffer absorbs the spike and hides it
Observability You own one request tree You must carry context across a boundary

I left speed out of that table. Asynchronous communication does not make your request faster. It moves the wait and buys isolation with a queueing delay.

The ownership column is the one I read twice. In your synchronous call, a failure lands on the caller, which has the context to decide what to do. In your asynchronous path, the failure lands on a consumer that may run minutes later, with no user waiting and nobody watching unless you built the watching. I treat that shift as the real cost of async, and my rule is to price it before I price the broker.

When is synchronous vs asynchronous communication a per-interaction decision?

If you choose one style for a whole service, you will get at least one interaction wrong. Your three inputs change from one call path to the next.

Take a checkout service you know, a composite example:

  • Your fraud decision is synchronous. Checkout cannot continue without the answer, the callee is inside your deadline, and a failure must appear as a held or declined order, not an order that might be declined later.
  • Your receipt email is asynchronous. You do not need it to continue, and the retry must outlive the HTTP request that started it.
  • Your warehouse notification and analytics feed are asynchronous fan-out. Two consumers need the same fact, and neither may block your checkout.
  • Your refund is a synchronous command with an asynchronous settlement. Your operator needs to know the refund was accepted; the money movement can finish later.

You now have four interactions, two styles, one service: you decided per path, not per architecture. I would keep the fraud call synchronous and spend the effort on its deadline, not on a queue.

Your system-level choice fails in a predictable way: declare the service event-driven, and your fraud call becomes a message. Now you wait for a reply that has no place to arrive, so you add a reply queue, a correlation table, and a timeout. You have rebuilt a synchronous call with three extra components and a worse error message, which is why I read what the decoupling actually costs before I recommend an async rewrite and ask for the reply path first.

Declare it synchronous, and your receipt email holds a web request open until the mail provider answers, so you have made a vendor's p99 your own.

When should you choose synchronous communication?

Choose synchronous when you cannot continue without the answer, the callee fits inside your deadline with margin, and a failed call has an honest outcome you can express.

Four tests decide it, and I would not waive any of them.

Your answer gates the next step. Authentication, pricing, inventory reservation, a fraud decision, a permission check. If your next line branches on the result, the interaction is synchronous by nature. Making it async means you either block anyway or you change the product.

Your fan-out is small and the tail fits your budget. Your latency is a distribution, and fan-out multiplies the tail. Dean and Barroso give the arithmetic: a server with a 99th-percentile latency of one second makes 1 in 100 requests slow, and a request that must collect responses from 100 such servers is slow 63% of the time.

At one slow request in 10,000 per server and 2,000 servers, almost one in five of your user requests is slow. I budget the p99 of the whole path, not the median of each hop.

I keep the hop count small even when the p99 looks comfortable. I would rather drop a feature than add a third hop I cannot deadline.

Your failure is honest. If the fraud provider is down, you should fail, hold, or degrade on a rule you wrote. Your asynchronous version accepts the order, returns success, and finds the problem after you told the customer yes, and I would write the degradation rule before I let anyone add a queue.

Your retry is safe and cheap. Your synchronous retry needs an idempotent operation and deadline left to spend. If you are missing either, your retry is a duplicate or a hang.

This is where a synchronous design fails quietly. Your deadline is not a cancellation. Netflix's Hystrix documentation is direct: there's no way to force the latent thread to stop work, so you can receive a TimeoutException while the latent thread keeps working and the request may still commit. AWS says the same from the API side: A timeout or failure doesn't necessarily mean that side effects haven't happened.

So your synchronous call carries an obligation beyond a timeout: you need a deadline that propagates, a cancellation path, and a cap per dependency so one slow dependency cannot consume every thread you have. Hystrix isolates each dependency in its own pool for that reason.

Then you pay in availability multiplication. Five dependencies at 99.9% each, called in sequence, leave you about 99.5% for the path. When your cluster at 1,000 requests per second receives 1,200, it can run out of resources and push load to the next cluster; Google's SRE book calls overload the most common cause of cascading failures.

Your synchronous call is a wire between your availability and theirs, and your availability budget prices it. I write that multiplication on the whiteboard before anyone argues for another dependency, and my default is to shorten the chain, not to wrap it.

When does asynchronous communication earn its cost?

You buy asynchronous communication for three cases: the work must survive your caller, your arrival rate is spikier than your consumer's capacity, or more than one consumer needs the outcome.

You need the work to survive you. You send the receipt email or generate the export. Your HTTP request is a bad place to keep work alive. A durable handoff means a deploy, a crash, or a client disconnect does not lose your job.

You need load leveling. I put a queue between arrival and processing when I want the consumer to run at a steady rate while producers burst. Microsoft's Queue-Based Load Leveling pattern states the trade cleanly: the queue decouples tasks from the service, so the service handles messages at its own pace, and you provision for average load rather than peak.

You need fan-out. When two teams need the same fact, a queue with two consumers is a work list; a log with two consumer groups gives each group the full history. Which one you need is the queue versus stream decision.

A fourth case is usually named badly, a slow dependency, and I would not buy a queue for one while you still wait. Async helps you only if you do not need the answer: if your checkout still waits for the fraud decision, moving it to a queue adds a hop, a timeout, and a correlation table to the same wait. I have seen that sold as decoupling, and my test is one question: does the caller still wait?

I would keep the caller waiting before I hid the wait behind a queue.

And a queue is not capacity: the caveat I repeat is Microsoft's, because if your average producer rate exceeds your consumer rate, the queue keeps growing and latency keeps rising. Autoscaling without a bound on the consumers' aggregate downstream rate only moves the overload downstream, so a buffer buys you time but not throughput.

Why does asynchronous communication fail more slowly than synchronous?

Your synchronous system drops work it cannot do, and your asynchronous system keeps it. Your dropped request fails in front of the user. Your kept request fails hours later, after the backlog drains or after the result is useless.

I hear async sold as resilience, and it is, while the broker retains the work; you pay in recovery time.

AWS states the arithmetic plainly: recovering from a one-hour outage requires double your system's capacity for another hour. Asynchronous services build up backlogs during outages, leading to long recovery times, unlike synchronous services, which drop requests during outages but have quicker recover times.

If your workload builds a backlog and you take 30 minutes to detect and mitigate it, you may have queued 10 times your consumer's capacity, so draining your backlog at full speed takes 300 minutes. A short spike becomes a five-hour incident.

Your queue-based system is bimodal: with no backlog your latency is low, but once arrival exceeds processing, it flips into a mode where end-to-end latency keeps climbing. Your dashboards look healthy in the first mode and lie in the second.

The mechanism is Little's Law, and AWS gives you the numbers: concurrency equals arrival rate times latency. At 100 messages per second and 100 milliseconds, you need about 10 threads; at the same rate and 10 seconds, you need about 1,000. Your consumer's latency and its concurrency are the same knob, and the knob turns against you exactly when your dependency is slow.

Then the trap closes: when your processing time crosses the visibility timeout, the queue assumes your consumer died and makes the message visible again, often to another worker, which also runs past the timeout. AWS calls the result what it is: an already overloaded service can fork-bomb itself.

So I expect your async system to fail slowly and quietly. I have stopped accepting async is more resilient without the recovery math, and I say so in review. Buy it with a backlog alarm, a cap on consumer concurrency, and a written answer for when the backlog outlives its usefulness. I would not recommend it without those three; in my judgement the recovery time is the part teams underprice.

Who should own the retry?

One layer owns the retry, and that layer must be able to make a repeat harmless. In your synchronous call that is the caller. In your asynchronous path it is the consumer, while the broker only redelivers.

Your rule is one retry owner per path, because retries at every layer multiply the load on the dependency you are trying to protect.

In your synchronous design, the caller owns the retry because you know the deadline and user context. You can fail fast, degrade, or ask the user to try again. You must also hold the idempotency key, because a timeout does not tell you whether the callee committed. Stripe's v1 API is a clean public model, where your client sends an Idempotency-Key and a retry with the same key returns the saved response, within the key's retention window, instead of repeating the charge.

In your asynchronous design, the broker owns redelivery, not correctness. SQS standard queues are at-least-once, so your consumer can receive the same message more than once and occasionally out of order. Your consumer owns the retry, and must make processing idempotent and decide what a duplicate means.

My review rule is to count the retry owners in your path. If your caller retries, your SDK retries, and your consumer retries, you have three owners and no proof, so pick one, put the key at the boundary, and let the other layers fail honestly. I would rather have one owner and a visible failure than three owners and a retry storm. I look for the key before I count the retries.

What does asynchronous communication cost in duplicates and ordering?

At-least-once delivery means your consumer may see the same message twice, and a queue does not promise order. Both are properties of the transport, so you design the consumer for them instead of configuring them away.

SQS standard queues make the contract explicit: at-least-once delivery, possible duplicates, and out-of-order arrival. FIFO queues narrow that to a message group, which is a broker concern rather than an interaction concern.

Duplicates are not an edge case you handle with a log line, because they are a normal delivery outcome. Your consumer needs one of three shapes, and I have not needed a fourth:

  • An idempotency key that you store with the effect. The second delivery finds the key and returns the first result.
  • A state machine with a version or status guard you enforce. Only move from `pending` to `paid` makes a duplicate a no-op.
  • A natural key plus an upsert. Use it when your operation is a set, not an increment.

The shape that fails in your consumer is apply the delta twice because the broker said once, and no broker says once. At-least-once is the honest contract, and exactly-once is a property of your consumer's write, not of the queue. I would design for the duplicate first and the happy path second.

How do you keep an asynchronous interaction observable?

You put a correlation id in the message, you measure the age of the oldest message, and you alarm when a message reaches the dead-letter queue. Producer-side success tells you almost nothing about whether the work happened.

Your producer availability mirrors the queue service's availability, so a green producer dashboard mostly measures the broker. Your consumer-side error rate can look worse than reality, because an attempt that failed and then succeeded on redelivery was counted as a failure. Your dead-letter queue detects the problem late, while what AWS actually watches is the age of messages that are in the queue, because it catches a lagging system early.

Age separates your normal backlog from a broken one, and AWS's IoT team added AgeOfFirstAttempt to measure enqueue time only on the first delivery attempt, so retries and deliberately slow devices do not pollute the signal. You need the same idea: measure the thing only a real backlog can move. I would not recommend the queue without that metric, and it is the first thing I ask for in review.

Your trace stops at the queue unless you put the context in the message and read it back on the consumer. AWS does this with a request id in the queued message and X-Ray on top, and without it your incident review will have two half-traces and no join.

Finally, give your user somewhere to look, because a queue is one-way and a reply needs a mechanism. A status resource is that mechanism. Without it, your support queue becomes the observability layer.

When your alarm fires, the work is how to triage the incident.

What migration path takes a synchronous call to asynchronous safely?

Move the side effect before you move the answer. Keep the caller's contract intact while you make the work durable, and change it only when the product can accept accepted, not done.

Each step removes a failure mode your next step would inherit, and I would not reorder the first three; my order is deliberate, and I would spend the extra release on the outbox again.

  1. Measure the interaction: record p50 and p99 latency, error rate, fan-out, and your caller's deadline. If it gates a payment, you do not have an easy case.
  2. Make the operation idempotent: add the key at the boundary, store it with the effect, and treat that as the entry ticket. Without it, both styles duplicate, and you only change which duplicate you cannot see.
  3. Write the state change and an outbox record in one transaction: a relay you own publishes the outbox row, your API still returns the synchronous answer, and you remove the dual-write problem before you remove the response.
  4. Change the contract only when the product earns it: return 202 Accepted with a status resource, or register a callback or webhook. This is a product decision: your user now has to come back, poll, or wait for a notification. If the UI hides that with a spinner and a poll loop, you have built a synchronous call with extra steps and a new timeout.
  5. Add the async operating kit before the traffic: bounded retries at one layer, a dead-letter queue with an alarm, oldest-message-age monitoring, a correlation id, and a cap per workload. If you cannot say what your consumer does when the downstream is slow, you are not done.
  6. Delete the synchronous path last: keep it until your last dependent caller moves, then remove it, because two paths are two behaviours you now have to keep in sync.

Write the reversal trigger down before you start: if you cannot alarm on message age and trace a message across the boundary, roll back. An unobservable async path is worse than the synchronous call it replaced, because the synchronous call at least fails where you can see it.

What does the decision look like in one pass?

An asynchronous answer is only available to you after both safety gates pass, and I run the gates first because a gate at the end is not a gate.

The gates: both must pass before you commit to any async path.

  1. Repeat safety and one retry owner: if you cannot make the side effect repeat-safe and name one owner, stop and fix it, because this gate is not a tie-breaker.
  2. Observability: if you cannot carry a correlation id, measure message age, and alarm on the dead-letter queue, stop, because an async path you cannot see is worse than the synchronous call it replaced.

The route starts at question 3.

  1. Does your caller need the answer to choose the next step? If yes, go to 4; if no, go to 5.
  2. Can the work finish inside your deadline at p99, with margin? If yes, choose synchronous. If no, change the product, cut the work, or raise your budget. If you cut the work or raise the budget, choose synchronous once it fits; if you changed the product, go to 5 and treat the answer as a notification. Do not add a status resource to a call that still gates the next step.
  3. Must the work survive your process, deploy, or disconnect? If yes, choose asynchronous, and add a reply path if anyone still expects an answer; if no, go to 6.
  4. Will your peak arrival exceed what your consumer can process? If yes, choose asynchronous with a queue and backpressure, plus a reply path where an answer is expected; if no, go to 7.
  5. Do several consumers need the same outcome? If yes, choose asynchronous fan-out, plus a reply path where an answer is expected; if no, a background job table is likely enough, and you should not buy a broker for one consumer.

I would not skip the gates because the queue is already bought, and I would want both answers in writing.

If you reach the end, choose synchronous, your default: for you it is the cheapest design that can be correct, it fails in front of the person who can act on the failure, and its backpressure is free.

My advice is not to treat asynchronous communication as the mature choice and synchronous as the beginner one. They are two ways to hold the state of an interaction, and each charges you in a different currency: synchronous charges you latency and availability coupling, up front, on every request, while asynchronous charges you duplicates, ordering, recovery time, and observability later, usually at 3 a.m.

You pick the style for every interaction you own and write down why, because that record lets the next engineer change one call path without rewriting the system around it. That is the record I ask for in review, and the system design frame is where the other decisions sit.

Related Reading