Hacker News new | ask | show | jobs
by kawsper 4362 days ago
Yeah, it feels like a dirty, dirty hack. The way I understood it is that the requests in flight would retry the same way as the new connections when the first iptables rule is applied.
1 comments

I think what will actually happen to requests in flight is:

- partial data received by old HAProxy is lost as old HAProxy exits

- new HAProxy comes online, binds to port, receives fd

- iptables rule removed. new HAProxy starts receiving new requests

- in-flight requests from the old HAProxy are timed out by the kernel (TCP RST) as nothing is there to read request data from the old fd or send response data.

So I think this is actually "worse" in some sense than the other retry behavior since it's not recovered inside the same TCP session but instead forces the client to open a new TCP session.