-
Notifications
You must be signed in to change notification settings - Fork 688
Add HTTP/2 PING-based connection health checks
#3980
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Introduce PING frame support for proactive connection health monitoring on idle HTTP/2 connections. The feature sends PING frames to detect unresponsive peers and close stale connections. Configuration via Http2SettingsSpec: - pingAckTimeout: Timeout for ACK response - pingAckDropThreshold: Maximum PING attempts (default: 1) Requires idle timeout configuration: - Client: ConnectionProvider.maxIdleTime - Server: HttpServer.idleTimeout The feature is opt-in and integrates automatically with connection pool eviction (client) and idle timeout handling (server). This implementation is based on PR #3612, reduces the scope and adds HttpClient support. Co-authored-by: raccoonback <[email protected]> Signed-off-by: Violeta Georgieva <[email protected]>
...les/src/main/java/reactor/netty/examples/documentation/http/server/liveness/Application.java
Dismissed
Show dismissed
Hide dismissed
reactor-netty-http/src/test/java/reactor/netty/http/Http2ConnectionLivenessTest.java
Dismissed
Show dismissed
Hide dismissed
reactor-netty-http/src/test/java/reactor/netty/http/Http2ConnectionLivenessTest.java
Dismissed
Show dismissed
Hide dismissed
reactor-netty-http/src/test/java/reactor/netty/http/Http2ConnectionLivenessTest.java
Dismissed
Show dismissed
Hide dismissed
reactor-netty-http/src/test/java/reactor/netty/http/Http2ConnectionLivenessTest.java
Dismissed
Show dismissed
Hide dismissed
reactor-netty-http/src/test/java/reactor/netty/http/server/HttpIdleTimeoutTest.java
Dismissed
Show dismissed
Hide dismissed
reactor-netty-http/src/test/java/reactor/netty/http/server/HttpIdleTimeoutTest.java
Dismissed
Show dismissed
Hide dismissed
reactor-netty-http/src/test/java/reactor/netty/http/server/HttpIdleTimeoutTest.java
Dismissed
Show dismissed
Hide dismissed
reactor-netty-http/src/test/java/reactor/netty/http/server/HttpIdleTimeoutTest.java
Dismissed
Show dismissed
Hide dismissed
Signed-off-by: Violeta Georgieva <[email protected]>
Signed-off-by: Violeta Georgieva <[email protected]>
Signed-off-by: Violeta Georgieva <[email protected]>
Signed-off-by: Violeta Georgieva <[email protected]>
Signed-off-by: Violeta Georgieva <[email protected]>
|
@violetagg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@violetagg
I added some comments with a few questions.
I’d appreciate it if you could review them.
reactor-netty-http/src/main/java/reactor/netty/http/Http2ConnectionLiveness.java
Show resolved
Hide resolved
reactor-netty-http/src/main/java/reactor/netty/http/Http2ConnectionLiveness.java
Show resolved
Hide resolved
|
|
||
| @Override | ||
| public void operationComplete(ChannelFuture future) { | ||
| if (!future.channel().isActive()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the future will be newly created, would it be fine not to check the active state of the current context channel?
(ex. !ctx.channel().isActive())
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you elaborate more?
reactor-netty-http/src/main/java/reactor/netty/http/client/Http2ConnectionProvider.java
Show resolved
Hide resolved
reactor-netty-http/src/main/java/reactor/netty/http/client/Http2ConnectionProvider.java
Show resolved
Hide resolved
reactor-netty-http/src/main/java/reactor/netty/http/client/Http2ConnectionProvider.java
Show resolved
Hide resolved
reactor-netty-http/src/main/java/reactor/netty/http/client/Http2ConnectionProvider.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@raccoonback Thanks for the review! Let me merge this one. |
Signed-off-by: Violeta Georgieva <[email protected]>
Introduce
PINGframe support for proactive connection health monitoring on idleHTTP/2connections. The feature sendsPINGframes to detect unresponsive peers and close stale connections.Configuration via
Http2SettingsSpec:pingAckTimeout: Timeout forACKresponsepingAckDropThreshold: MaximumPINGattempts (default: 1)Requires idle timeout configuration:
ConnectionProvider.maxIdleTimeHttpServer.idleTimeoutThe feature is opt-in and integrates automatically with connection pool eviction (client) and idle timeout handling (server).
This implementation is based on PR #3612, reduces the scope and adds
HttpClientsupport.