[英]delay in FIN ACK TCP
i have two servers that communicate with HTTP: view part of client code 我有两个与HTTP通信的服务器:查看部分客户端代码
PostMethod postMethod = new PostMethod(strURL);
int bodylength=UCIPBodyRequestGen.toStringBodyRequest(_request, DEFAULT_CHARSET).length();
setRequestHeader(postMethod,bodylength);
postMethod.setRequestBody(requestBody);
HttpClient myClient = new HttpClient();
myClient.setConnectionTimeout(mcf.getTimeout());
myClient.setTimeout(mcf.getTimeout());
int statusCode = myClient.executeMethod(postMethod);
responseBody=postMethod.getResponseBodyAsString();
i have a little delay in some request ~500ms
and the other average is ~20ms
我在某些请求中有一点延迟
~500ms
,另一个平均值是~20ms
TCPDUMP show that the delay is in TCP FIN-ACK
2014-12-23 09:38:59.069230 HTTP/XML 1534 POST /Servlet HTTP/1.1
2014-12-23 09:38:59.070450 HTTP 514 HTTP/1.1 200 OK
2014-12-23 09:38:59.110758 TCP 66 14783?9770 [ACK] Seq=1469 Ack=450 Win=33920 Len=0 TSval=2321949059 TSecr=2321949019
2014-12-23 09:38:59.602623 TCP 66 14783?9770 [FIN, ACK] Seq=1469 Ack=450 Win=33920 Len=0 TSval=2321949551 TSecr=2321949019
any clue about this delay? 关于这个延迟有什么线索吗?
A FIN ACK packet is assembled as: FIN ACK数据包组装为:
Between the first servers FIN and ACK, is the ACK and FIN pair of the other server, so this connection termination phase (four-way handshake) takes time to take place. 在第一台服务器FIN和ACK之间,是另一台服务器的ACK和FIN对,因此此连接终止阶段(四次握手)需要时间。
Regards 问候
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.