]> git.kaiwu.me - haproxy.git/commit
[MINOR] prevent the system from sending an RST when closing health-checks
authorKrzysztof Oledzki <ole@ans.pl>
Thu, 11 Oct 2007 16:41:08 +0000 (18:41 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 11 Oct 2007 16:41:08 +0000 (18:41 +0200)
commit9942382d76060c5af42274030dcb35b1dff85fc0
tree6b65d4f2602470d5b88b8cd538bc94ce9560318d
parent132209b8ab8eb59f829a294f806ae6422dfd9717
[MINOR] prevent the system from sending an RST when closing health-checks

On Sat, 22 Sep 2007, Willy Tarreau wrote:
> On Sun, Sep 23, 2007 at 03:23:38AM +0200, Krzysztof Oledzki wrote:
> > I noticed that with httpchk, haproxy generates TCP RST at end of a check.
> > IMHO, it would be more polite to send FIN to a server, especially that
> > each TCP RST found by a tcpdump makes me concerned that something is
> > wrong, as it is hard to distinguish between a RST from a httpchk and from
> > a normal request, forwarded for a client.
>
> I have also noticed it very recently. In fact, it's never the
> application (here haproxy) which decides to send an RST, it's the
> system. It does so because the server returns data on a terminated
> socket. I guess it's because the health-check code does not read much
> of the response. In fact, we just need to read enough to process common
> responses. If people are dumb enough to check with something like "GET
> /image.iso", they should expect to get an RST after a few kbytes
> instead of reading the whole file!

Right, that was easy. Attached patch changed what you described. Now
haproxy finishes http checks with FIN.
src/checks.c