I am upgrading the haproxy from 2.4.2 to 3.0.9 in a project, in which haproxy is used to route HTTP2 message. There is a global configuration “timeout http-request 10s” in the configuration file. After the upgrade, I find that after a client connects to the haproxy server to send a HTTP2 request message, if there is no more message exchange in 10 seconds, haproxy as server side will send HTTP2 GOAWAY message to the client to end this session. But there is no such problem in version 2.4.2. After I change this configuration to 30 seconds, then the session may be kept 30 seconds in the similar scenario. But as the reference of haproxy document, this configuraion is used to “Set the maximum allowed time to wait for a complete HTTP request”, why does it impact the session duration? Could anybody provide a clue for it? Or is it a bug?
When timeout http-keep-alive
is not set, the value from http-request
is also used for this.
I suggest reading the entire documentation about http-keep-alive, it is quite long because it is indeed quite complex. If you set this more specific timeout, it doesn’t need to steal a timeout value from another value like http-request
:
lukastribus, thank you very much! In fact, the parameter you mentioned is also configured in our system:
timeout http-request 10s
timeout http-keep-alive 10s
But in the version 2.4.2, these two parameters do not impact on the session duration in the scenario I described above. While in version 3.0.9, they do. Even “timeout http-keep-alive” is set to 30s but “timeout http-request” kept 10s, the session will be ended as above in 10 seconds. So I do not know why the current realization of them are not consistent with the description in the configuration manual.