akka / akka-http

The Streaming-first HTTP server/module of Akka
https://doc.akka.io/docs/akka-http
Other
1.34k stars 594 forks source link

HTTP/2: probe idle connection with PING before sending new requests #3632

Open jrudolph opened 3 years ago

jrudolph commented 3 years ago

The HTTP/2 spec suggests this strategy in Request Reliability Mechanisms in HTTP/2. This would improve the situation where an idle connection has silently broken.

That said, depending on the server implementation, sending a PING, may or may not prevent a server from doing an idle-connection shut down.

ignasi35 commented 3 years ago

Would this be a default behavior or an opt-in? It would be too much extra latency if every request is preceded by a PING roundtrip.

jrudolph commented 3 years ago

Would this be a default behavior or an opt-in? It would be too much extra latency if every request is preceded by a PING roundtrip.

That would have to be decided. After all this would already be an optimization that needs fine-tuning. Just wanted to record it here, since it is suggestion in the spec.