Synchronous vs. Asynchronous Communication in Distributed Systems
In this lesson1 sections
Synchronous vs. Asynchronous Communication in Distributed Systems
Decide which work must finish before a user can continue and which work can complete later. You will compare request-response workflows with deferred processing, then account for deadlines, acknowledgment, retries, and user-visible state.
In a distributed system, the way services communicate is a fundamental architectural decision that impacts scalability, reliability, and complexity.
A checkout may need a validated price before accepting payment but can send a receipt later. Start with those dependencies, then choose the communication mechanism.
Let’s begin with the first model: synchronous communication.
Synchronous communication
In a synchronous workflow, a caller needs the receiver’s response before completing the current operation. This is a dependency between operations; it does not necessarily mean an operating-system thread sits blocked while waiting.
A blocking client API waits on the calling thread. An asynchronous client API can await the same response while the runtime uses that thread for other work. In both cases, the business workflow still depends on the remote result. The diagram below concerns that workflow dependency.
The following diagram shows a request-response dependency:
The rest of this lesson is for Premium members
Premium opens every lesson in this course, along with all questions and solutions on PracHub.