HAProxy closes long living TCP connections ignoring TCP keepalive

前端 未结 2 1283
傲寒
傲寒 2021-02-08 15:25

I have configured HAProxy (1.5.4, but I tried also 1.5.14) to balance in TCP mode two server exposing AMQP protocol (WSO2 Message Broker) on 5672 port. The clients create and us

2条回答
  •  南旧
    南旧 (楼主)
    2021-02-08 15:27

    TCP keep alive is at the transport layer and is only used to do some traffic on the connection so intermediate systems like packet filters don't loose any states and that the end systems can notice if the connection to the other side broke (maybe because something crashed or a network cable broke).

    TCP keep alive has nothing to do with the application level idle timeout which you have set explicitly to 200s:

    timeout client 200000ms
    timeout server 200000ms
    

    This timeouts gets triggered if the connection is idle, that is if no data get transferred. TCP keep alive does not transport any data, the payload of these packets is empty.

提交回复
热议问题