A user reported a problem in the field where an HTTP/2 connection remained active at the TCP layer, but dead at the HTTP/2 layer. Turning on HTTP/2 pings mitigated the problem, but our HTTP/2 pings are somewhat clumsy in this situation (they need to be manually configured, and the ping interval is generally too frequent for efficiency and too infrequent for responsiveness).
We sketched out an alternative design:
- When an HTTP/2 call times out at the application layer, mark the host connection as degraded
- Send a ping on the degraded connection
- When the pong is received, unmark the connection as degraded
While an HTTP/2 connection is degraded, don’t use it to carry new exchanges.
If the pong is never received, the connection will eventually be evicted from the pool.
A user reported a problem in the field where an HTTP/2 connection remained active at the TCP layer, but dead at the HTTP/2 layer. Turning on HTTP/2 pings mitigated the problem, but our HTTP/2 pings are somewhat clumsy in this situation (they need to be manually configured, and the ping interval is generally too frequent for efficiency and too infrequent for responsiveness).
We sketched out an alternative design:
While an HTTP/2 connection is degraded, don’t use it to carry new exchanges.
If the pong is never received, the connection will eventually be evicted from the pool.