Synchronous communication
Synchronous communication couples a request in time to its response. The caller waits until the result, error or end of his waiting period.
- Waiting pathAll the calls that are waiting for.
- Availability multiplied byAny dependence reduces the overall result.
- TimeoutLimits waiting in case of failure.
Context
Why this is important
Those who call in sync are waiting. Waiting times add up, availabilities multiply: every dependency in the checkout extends the waiting path and can block it in the event of failure. Temporally decoupled processing handles asynchronous communication.
This building block explains immediate request-response relationships. For later processing, see Asynchronous Communication.
At a glance · call with waiting for answer
Waiting Chain in Checkout
In modular monoliths, ordering requests warehouse and payment directly. The payment module calls the external payment provider via the network.
This is how you read the picture
- Waiting path The switched-on calls; their milliseconds result in the waiting time.
- Availability multiplied by The availability of the checkout decreases with each connected call.
- Timeout If the provider is unsuccessful, the order waits until 3000 ms.
OrderWaiting for
- Waiting time of the checkout
- 450 ms
- Availability of checkout
- 99.30 %
Times and Availabilities illustrative
Benefits & limitations
Helps if:
- A request-response interaction returns the result the caller needs for their next step.
- An immediate business feedback can be returned directly with synchronous communication.
- Controlled time budgets bound waiting; a response within budget supplies the result needed for the next step.
Boundaries
- Each additional synchronous dependency extends the waiting path and reduces the overall availability of the checkout.
- After a timeout, the other party may already have performed the operation. Timeout bounds waiting; Retry controls further attempts.
- A failed external provider blocks the caller until the end of the waiting period, even if all internal modules are running.
In practice
- Distribute the time budget across all synchronous dependencies and set a clear response limit. This leaves a verifiable maximum waiting time for the entire interaction.
- Differentiate business rejection, transport error and timeout in the contract. The caller can then appropriately cancel, ask or display a status.
- Retry only operations with safe semantics and a limited attempt count. Timeout covers waiting limits; Retry governs repeated calls.
Read the detailed explanation
In synchronous communication, the caller waits for a response or a defined time limit. The result can feed directly into the current process. The other party's latency and failures therefore affect the caller immediately.
Timeouts establish only that no timely response arrived, not the business outcome. Time budgets, error responses and permitted retries are part of the contract. Long synchronous chains add waiting time and couple availability across components.
Timeout limits waiting but does not establish whether a commit occurred; Retry therefore requires safe retry semantics.
REST over HTTP and gRPC are common forms of synchronous calls. Both need timeouts to prevent indefinite waiting.
Check your understanding
Test yourself in three stages
ReadingCheck in the picture
How do waiting times and availability change when the invoice is switched on?
View the solution with justification
The waiting time increases from 450 on 1250 ms, the availability decreases by about 99,3 at approximately 98,8 Percent (illustrative values).
ApplyingTransferred to a new situation
The payment provider fails. What happens to the checkout?
View the solution with justification
Payment waits for the provider, order for payment. The checkout is up until the timeout 3000 MS and then fails.
EvaluateWeighing an alternative
Should the PDF generation of the invoice remain in the synchronous checkout?
View the solution with justification
Advantage: The document is available immediately. Disadvantage: 800 ms more waiting time and a failure risk more. Recommendation: generate asynchronously, the checkout does not need the receipt for confirmation.
Explore further
These building blocks continue the thoughts of this page.
References
- IETF · HTTP Semantics (RFC) 9110) (opens in new tab)Normalizes HTTP methods, secure and idempotent operations, and status codes.
- gRPC · Core Concepts (opens in new tab)Describes call models, deadlines, and the life cycle of an RPC.
- Microsoft · Communication in Microservice Architecture (opens in new tab)Compares synchronous calls and asynchronous message transmission.