We are running haproxy on virtual machine say VM1 and forwarding data received on port 8244 to 8244 port of server1.
But in tcpdump packet captured on VM1, we are seeing connection reset on port 8244 every 2 seconds.
Below are my configuration.
listen my_proxy :8244
mode tcp
balance roundrobin
server server1 server1:8244 check on-marked-up shutdown-backup-sessions on-marked-down shutdown-sessions
server server2 server2:8244 check backup
Here is sequence of reset observed in tcpdump.
Source Destination Packet info
VM1 Server1 [SYN]
Server1 VM1 [SYN, ACK]
VM1 Server1 [RST, ACK]
Is connection reset after every 2 sec is expected behaviour, if not please let me know steps to resolve this.
That’s the health checks haproxy uses.
Haproxy uses RST to close the health check as it free’s resources on haproxy and the backend server immediately.
Thanks for confirmation, After removing check configuration from haproxy, I have not seen any reset after every 2 sec, but I can see (SYN -> SYN, ACK -> RST, ACK) sequence after ever 60 sec is there specific reason for this. What configuration should I check?
Here is client server time out setting I am using.
timeout client 600000
timeout server 600000
What is the actual issue here?
@surajbora these sequences of packets including a RST are completely normal. This is the way that haproxy uses to do health checks efficiently. As soon as haproxy has discovered that the endpoint is up, there is no point in wasting any further resources at either end. It turns out that using TCP RST is the most efficient way for kernels at both ends of the connection to finish their conversation and free up those resources.
What @lukastribus is saying is, yes we see the traffic, but are you seeing any actual application layer problems as a result of this?
Again, the RST are completely normal. Don’t panic