HTTP/2: throttle validateAfterInactivity pre-flight PING checks#606
HTTP/2: throttle validateAfterInactivity pre-flight PING checks#606arturobernalg wants to merge 1 commit intoapache:masterfrom
Conversation
|
@arturobernalg The change-set will likely need some work, but I am conceptually fine with it. @rschmitt Would you have any conceptual objections to the idea? |
a80a98d to
6224ba5
Compare
This sounds way better than the current HTTP/2 implementation of |
|
I think we have too many config knobs already. I'd really prefer to expose this through |
|
keep-alive is now driven via setValidateAfterInactivity (no new H2Config knob), so it fits the existing connection validation API. |
@ok2c should i do another change here? |
|
@arturobernalg I like the fact that API changes are small, but I find the implementation too complex and overwrought: The process should be quite simple:
|
@ok2c I reworked the keep-alive handling to follow the exact 4-step process you outlined |
httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractH2StreamMultiplexer.java
Show resolved
Hide resolved
2e89a80 to
319ad14
Compare
httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractH2StreamMultiplexer.java
Outdated
Show resolved
Hide resolved
5fafada to
40b8724
Compare
|
@arturobernalg Very good. Almost there. One last thing we should do is to make sure does not fire more frequently than 1 or 3 seconds even if one sets |
httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractH2StreamMultiplexer.java
Show resolved
Hide resolved
Avoid firing pre-flight PING more frequently than the configured minimum interval. Prevents busy looping and excessive traffic with pathological timeout values.
5cb80e4 to
94fb834
Compare
Throttle the validateAfterInactivity pre-flight PING logic with a fixed granularity.
Prevents excessive PING traffic when validateAfterInactivity is set to tiny values (e.g. 1ms).