TCP handshake latency
I have 2 machines on a 100 Gb/s LAN which talk to each other over TCP.
When I do a tracert or a ping from the client to the server, even a large ping, I get an answer in less then 1 ms. However, when I'm sniffing the TCP packets on the client side, I see that 40ms pass between the time it sends the first message of the 3-way handshake, to the time it receives the a开发者_C百科nswer from the server. The server is dedicated to this client and handles nothing else.Is this reasonable? I'd expect it to be much much faster.
Setting TCP_NODELAY and combining a couple of messages to a single one did the trick, messages were just too small.
精彩评论