Communication protocol is a system of rules that allows two or more entities of a communications system to transmit information via any kind of variation of a physical quantity.
The protocol defines the rules, syntax, semantics and synchronization of communication and possible error recovery methods. Protocols may be implemented by hardware, software, or a combination of both.
There are 3 types of communication that occur across services that help us in building quality scalable systems:
- Synchronous Communication
- Asynchronous Communication
- Message-based Communication
1. Synchronous Communication
Synchronous communication is a form of communication when two or more parties exchange information nonstop from beginning to end.
An example of synchronous communication or a blocking call is when the client has made a request and waits for its fulfillment.
Illustration: Consider below 3 steps:
- Data is being fetched from the database.
- Updation over data received.
- Return the updated data.
All above steps above will occur sequentially
.png)
Synchronous Communication
Applications of Synchronous Communications:
- To achieve consistency
- Transaction communications
Real-time applications of Synchronous Communication:
- Bank payments
- Ticket booking
- Real-time decision making
- Stock Market
2. Asynchronous Communication
Asynchronous communication is a form of communication in which the client is free to initiate or pause additional tasks without having to wait for a response. The client can do any action on the application without having to wait for a response, even though responses might take some time to reach the client.
Illustration: Consider the same above illustration where the client is being rewarded with a cashback. Hence prior to returning, there will be another step:
- Data is being fetched from the database.
- Updation over data received.
- Any operation where we are waiting for our data again to get updated. (In the above case we need to send a notification to the client who is getting cashback for the transaction)
- Return the updated data.
Note: The step of adding a product to a cart over an e-commerce website is a Synchronous Communication Protocol.
The product is being checked in real-time as we require the database to be consistent so there will be no blocking. Hence it will be a synchronous communication.
Difference between Synchronous and Asynchronous communications:
Let us plot visualization from the above media in a tabular format that is as follows:
Synchronous Communication |
Asynchronous Communication |
In synchronous communication, data is sent in form of blocks or frames. |
In Asynchronous communication, data is sent in form of bytes or characters. |
Synchronous communication is fast. |
Asynchronous communication is slow. |
Synchronous communication is costly. |
Asynchronous communication is economical. |
In Synchronous communication, the time interval of transmission is constant. |
In Asynchronous communication, the time interval of transmission is not constant, it is random. |
In this transmission, users have to wait till the transmission is complete before getting a response back from the server. |
Here, users do not have to wait for the completion of transmission in order to get a response from the server. |
In synchronous communication, there is no gap present between data. |
In Asynchronous communication, there is a gap present between data. |
Efficient use of communication lines is done in synchronous transmission. |
While in Asynchronous communication, the communication line remains empty during a gap in character transmission. |
The start and stop bits are not used in transmitting data. |
The start and stop bits are used in transmitting data that imposes extra overhead. |
Synchronous communication needs precisely synchronized clocks for the information of new bytes. |
It does not need synchronized clocks as a parity bit is used in this transmission for information of new bytes. |
3. Message-based Communication
It is the exchange of information based on messages is referred to as communication.
The client sends a message to a service with a request. The response is provided by the service in the form of a message. Since the communication is asynchronous, the client is free to start or stop any other process and is not obligated to wait for the process.

Message-based Communication
Other parts in this System Design Tutorial:
- What is System Design
- Analysis of Monolithic and Distributed Systems
- Important Key Concepts and Terminologies
- What is Scalability and How to achieve it – Learn System Design
- Databases in Designing Systems
- What is High-Level Design and Roadmap in System Design
- What is Low-Level Design and Roadmap in System Design
Feeling lost in the vast world of System Design? It's time for a transformation! Enroll in our
Mastering System Design From Low-Level to High-Level Solutions - Live Course and embark on an exhilarating journey to efficiently master system design concepts and techniques.
What We Offer:
- Comprehensive Course Coverage
- Expert Guidance for Efficient Learning
- Hands-on Experience with Real-world System Design Project
- Proven Track Record with 100,000+ Successful Enthusiasts
Last Updated :
22 Mar, 2023
Like Article
Save Article