1,292 views
3 votes
3 votes
One of the case of  Silly window syndrome  occurrence  is when sender is producing only one byte at a time from transport  layer  . And for that Nagles  solution is " collect  it upto RTT time (worst case ) or upto 1 MSS  (if before waiting upto RTT we got this much data) then send it to  reciever.  

Now my doubt  is" when we use any interactive  application like chatting  and we want only 1 byte of data from transport  layer and  we use PSH flag = 1 for specifying that push the data to lower layer without waiting  for MSS .  

So is that case also considered  as Silly  window syndrome  or if it isn't then "why "??

But here we are demanding for 1 byte data only . And nagles  solutions is the solution  for 1 byte data from sender side. If this solution  will be applied  here too then every chat will become  an email  . Plzz clear this thing ???

1 Answer

Best answer
3 votes
3 votes

Nagle's algorithm was invented to solve problems of small packets by applications like telnet. I don't think chat application is much different than telnet. 

However if consider applications like gaming, where we need to send updates on player's location, sending one coordinate and waiting for another second before sending another coordinate would result in very annoying lagging. The solution in this case would be to disable Nagle's algorithm like you said.

In socket API users can't set/reset push flag. It is managed by TCP layer. To disable Nagle's algorithm we need to set TCP_NODELAY = 1 by setsockopt system call.

If this solution  will be applied  here too then every chat will become  an email.

No it won't. If you think about it, fastest typing speed of a human is 212 wpm which is about 3.5 words per second. Even if RTT in the Internet is 1 second (I pinged facebook.com and it was (avg/max) 77/95 ms, I also pinged University of Chile, Santiago, among the furthest cities from the city I live and it was 433/517 ms.) usage of Nagle's algorithm would not create problem here because user would have typed about 4 words by the time ack of first byte comes, which now we can send. 

selected by

Related questions

2 votes
2 votes
1 answer
1
KISHALAY DAS asked Oct 21, 2016
1,098 views
1 votes
1 votes
3 answers
2
Anuanu asked May 30, 2016
5,370 views