how exactly does "timeout client" work in the context of HTTP/2?
I've tried to answer this question myself by experimentation however it
seems to me as there are too many unknowns to be able to answer them
fully reliably for all scenarios this way (the experiments are also not
trivial to set up).
The specific version of haproxy I'm interested in is 3.2 (although if
how this directive works differ between versions it would be good to know).
Concrete things I'd like to learn:
1. does "timeout client" work per connection or per stream or it applies
to both these cases?
2. In the documentation we read "The inactivity timeout applies when the
client is expected to acknowledge or send data". When exactly is the
client expected to acknowlege or send data?
3. If "timeout client" works per stream, is the behavior different when
there is just a single stream outstanding on the connection comparing to
the multiple stream situation?
4. Does HTTP/2 PING refresh "timeout client"? From what I've read here:
https://discourse.haproxy.org/t/grpc-keepalive-timeout/5580 - "PING
properly refreshes the connection’s timeout" and " PING doesn’t
reference any stream and is only connection-aware (...)", I understand
that it does but it only refreshes the timeout for the whole TCP
connection and it doesn't refresh timeout for any specific stream. Is
there a way to somehow refresh timeout for a specific stream?
I've checked by experiments that if a client has only established a
connection and does nothing more, "timeout client" will not trigger.
However, if HTTP/2 preface has been set, the timeout will trigger. I've
tried to send only part of a HEADER frame and then wait for a time
longer than "timeout client" and this timeout didn't trigger (although
honestly I'm not 100% sure if I was doing it correctly).
I've also tried to search haproxy formilux mailing list archives for
answers but I also haven't found the complete response them. I've found
that in the past versions of haproxy - for example in
https://cbonte.github.io/haproxy-dconv/2.6/configuration.html#4-timeout%20http-keep-alive
- the documentation stated that
"When using HTTP/2 "timeout client" is applied instead. This is so we
can keep using short keep-alive timeouts in HTTP/1.1 while using longer
ones in HTTP/2 (where we only have one connection per client and a
connection setup)".
But such statement is not present in
https://docs.haproxy.org/3.2/configuration.html#timeout%20http-keep-alive
and what's more the documentation for this version of haproxy seems to
be telling that http-keep-alive applies for HTTP/2 connections. I don't
know if it is on purpose.
I'll be grateful for help.
Thanks in advance.