Ch. 10 · Microservices

Microservices: Synchronous Calls Versus Messaging

Microservices: Synchronous Calls Versus Messaging. Learn the reasoning, a practical example, common mistakes and an interview exercise.

~2 min readbeginnerupdated Oct 3, 2026

Synchronous calls require immediate availability; messaging decouples timing but adds delivery, ordering and failure-management responsibilities.

Before you start

You should understand HTTP, database transactions and the difference between one process and independently failing services. Draw the participants and message direction before choosing a pattern. Include timeout, duplicate delivery and recovery in the model instead of considering only successful requests.

The practical goal is to reason through this situation: Checkout can return an accepted state while fulfillment proceeds asynchronously. Read the walkthrough first, then try the interview exercise before opening its answer. The important part is explaining the decision and its consequences, rather than remembering a definition alone.

Step-by-step walkthrough

Step 1: Determine immediate requirements

Ask whether the user needs completion or merely acceptance before continuing.

Step 2: Model message responsibilities

Specify delivery, duplication, ordering and failure handling.

Step 3: Expose progress

Give accepted work a trackable outcome instead of claiming it finished.

Worked scenario

Checkout can return an accepted state while fulfillment proceeds asynchronously.

Checkout returns an accepted order ID while fulfillment processes a message. The user can inspect pending, completed or failed status. If fulfillment temporarily stops, accepted orders remain queued under a retention policy; the contract must explain the delay and how unrecoverable work becomes visible.

Common mistake

Async communication does not remove coupling to message schemas or business expectations.

Verify the behavior

Test unavailable consumers, duplicate delivery and delayed completion.

Interview exercise

Choose notification delivery.

Answer and reasoning

Use messaging when delayed delivery is acceptable, and define duplicates, retries and user-visible status.

Continue learning

Compare the scenario with the Microservices interview questions and test your understanding with the Microservices MCQs. For terminology and implementation details, consult the reference material.

More in Microservices

read ✓Microservices · hard

Microservices Anti-Corruption Layer

Protect a service's domain model from a foreign or legacy model with a translation layer at the boundary.

~2 min readread →
read ✓Microservices · hard

Microservices API Versioning and Evolution

Evolve service APIs without breaking consumers using additive changes, explicit versioning and consumer-driven contracts.

~2 min readread →
read ✓Microservices · hard

Microservices Backend for Frontend

Use a per-client BFF to aggregate services and shape responses, without letting it become a shared god service.

~2 min readread →
esc