What is piggybacking in the computer network?

Piggybacking means riding over something. In a real example, if someone is about to start traveling toward a destination with his bike. At the same time, you also plan to go to the same place. You can ask for a lift. If you get no one, you must use your bike for the ride.

In the above example, there are many advantages of sharing resources, such as saving fuel, less traffic on the road, lesser pollution, etc.

A similar concept is used in computer networks for more optimized communication. In piggybacking, a sender sends a user data packet with the acknowledgment (ACK) if an ACK is about to go to the same destination. 

Reliable communication has an acknowledgment from the receiver. SCTP protocol is one of the examples of a reliable transport layer protocol in the OSI model. SCTP supports piggybacking by sending a DATA chunk with the ACK. It optimizes the underlying network bandwidth.

 With piggybacking, you will see a single message (DATA + ACK)  over the wire instead of two separate messages. 

How is piggybacking done?

Here we will explain the concept with an example.

  • Two computers, named A and B, are over an IP network. They communicate with each other using a reliable SCTP protocol. 
  • A sends a packet to B and waits for the response (ACK) before sending the next packet. 
  • Node B does the same to communicate in another direction.
  • If there is no piggybacking supported, then the response of a sent packet will contain an SCTP-ACK chunk only.
  • In piggybacking, if A sends the packet to B, B waits (for a short time) for a user DATA packet before sending the ACK to A. Once the user packet is received within a time frame,  B sends both ( ACK  and user DATA) in a single network message. 
  • On A, the message is processed as two separate chunks. One is ACK, and the other is the user DATA.
  • This saves the bandwidth of the network but adds a little delay. 

What are the Advantages and disadvantages of piggybacking?

This network optimization technique has advantages and disadvantages similar to most other things. The main disadvantage is, blocking of ack for some time. This may cause a connection to go down or may cause a service problem if the delay is more than expected. To avoid problems, piggybacking uses a tiny duration timer.

On the advantage side, it makes better use of bandwidth. The underlying cable and intermediate switches, routers, etc., will be less loaded. The price will also be reduced if someone pays to utilize a network based on messages.