In: Computer Science
Nagle algorithm
Suppose a transmitter application wants to send the letters "abcdefghi", one letter per second. The transmitter uses a TCP connection with an RTT of 4.3 seconds. Assuming the use of Nagle's algorithm, show, using a table, the time of sending and the contents of each packet sent.
Nagle's Algorithm:-
Data produced by the Application:- 'abcdefghi'
Data production rate:- 1 character/second
We will consider timer starts from 0 for reference. And I'll assume all delays are '0'.
Table:-
Packet number | Data | Transmission time (t) |
0 | "a" | 1 |
1 | "bcde" | 5.3 |
2 | "fghi" | 9.6 |
Packet number '0' will containf only 1st produced letter which is "a" and will transmit at "t" = 1 second.
After this, sender will wait for 4.3 seconds for recieving acknowledgement of 1st packet during this packet sender's application will produce 4 more letters "bcde". So after acknowledgement of 1st packet at "t" = 5.3 second, sender will send these 4 letters in packet '1'.
After this, sender will again wait for 4.3 seconds for recieving acknowledgement of 2nd packet during this time, sender's application will produce 4 more letters "fghi". So after acknowledgement of 2nd packet at "t" = 9.6 second, sender will send these 4 letters in packet '2'.