Re: TCP Resets

From: Willy Tarreau <w#1wt.eu>
Date: Sat, 30 Apr 2011 12:37:50 +0200


Hi Justin,

On Thu, Apr 28, 2011 at 02:16:27PM -0700, justin phelps wrote:
> I've just inherited an HAP network.
> On all of the servers that are load balanced I'm seeing a ton of RSTs from HAP. Everything appears to be working just fine, but it seems abnormal to me that HAP would terminate every session via RST instead of FIN.
> I've tried unsetting abortonclose in case that was an issue, but it didn't change the behavior.
> Is this normal behavior? If not, what configuration might be causing it?
> Running 1.4.9 on Linux 2.6.18-194.26.1.el5

Yes it is the normal behaviour when haproxy closes a connection to the server. The reason is that if it does not do that, it must keep the socket in TIME_WAIT state for 2 MSL (about 2 minutes on most Linux boxes), and this will prevent it from re-establishing a connection to the server using the same source port during that time. So since it knows it has received all the data, it can definitely destroy the socket as it does not need anything else.

A second benefit is that it reduces the number of packets on the network (1 vs 3) and that the connection is released 1 RTT faster. In the end this contributes into running with less concurrent connections on the server and slightly lowering its load for the same traffic, eventhough it was not the initial reason.

Regards,
Willy Received on 2011/04/30 12:37

This archive was generated by hypermail 2.2.0 : 2011/04/30 12:45 CEST