java - TCP Connect takes X100 longer than ping -
I have a Java process on the machine that communicates with TOMcat on machine B. through TB I connect TCP (Only sync-sync / AX exchange) takes the order of 100 ms continuously, while a ping request takes 1 ms (the service is on the same LAN).
- Could there be a delay in setting up a TCP connection?
- How do I optimize it?
Note that:
- This is not yet a 3-way handshake,
- The server is a very strong The machine is and is not subject to load.
- The connection request is for an IP, not a hostname, so no DNS lookup is included. In fact, it is not relevant because I measure the time of SYN left machine A.
- The client sees the time difference between 100-150 ms to see the SYN and obtain the SYN / ACK.
- The server sees only time difference of 20ms between receiving SYN and sending SYN / ACK.
It seems that the problem is not in the client or server itself, on the client and server Put two packet dumps:
Therefore, the problem should be in some intermediate layer (router / firewall / keynote).
Comments
Post a Comment