Repository navigation
quiche: add connection keepalive support - #18260
Conversation
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
|
/retest |
|
Retrying Azure Pipelines: |
|
coverage CI fails because kill_request:kill_request_filter_integration_test, which seems unrelated. |
|
/assign @ggreenway @RyanTheOptimist |
| // :ref:`connection idle_timeout <envoy_v3_api_field_config.listener.v3.QuicProtocolOptions.idle_timeout>` to | ||
| // prevent idle timeout while not too small to throttle the connection or to flood the peer. | ||
| // If zero, disable keepalive probing. | ||
| google.protobuf.UInt32Value max_interval = 1 [(validate.rules).message = {required: true}]; |
There was a problem hiding this comment.
nit: since this is simply a number (and not an std::duration or QuicTimeDelta) let's add _seconds to the name in order to make the units obvious.
| // | ||
| // If zero, disable keepalive probing for a server connection. For a client | ||
| // connection, if max_interval is also zero, do not keepalive, otherwise use max_interval to probe all the time. | ||
| google.protobuf.UInt32Value initial_interval = 2 [(validate.rules).message = {required: true}]; |
| } | ||
|
|
||
| bool EnvoyQuicClientSession::ShouldKeepConnectionAlive() const { | ||
| return !disable_keepalive_ && quic::QuicSpdyClientSession::ShouldKeepConnectionAlive(); |
There was a problem hiding this comment.
This seems slightly scary to me, but this seems to do what the feature request is for so I guess it's good to go :)
There was a problem hiding this comment.
The docs imply that setting keepalive just causes extra traffic to solicit traffic from the peer, but doesn't directly alter the lifetime of the connection. Please explain what's going on here.
There was a problem hiding this comment.
ShouldKeepConnectionAlive() is used by QUICHE to decide if it should probe the peer at all.
| // If zero, disable keepalive probing. | ||
| google.protobuf.UInt32Value max_interval = 1 [(validate.rules).message = {required: true}]; | ||
|
|
||
| // The interval in seconds to send the first 6 keep-alive probing packet to prevent |
There was a problem hiding this comment.
nit: packet => packets
| google.protobuf.UInt32Value max_interval = 1 [(validate.rules).message = {required: true}]; | ||
|
|
||
| // The interval in seconds to send the first 6 keep-alive probing packet to prevent | ||
| // connection from idle timeout. The following probing will be sent, each |
There was a problem hiding this comment.
... to prevent the connection from hitting the idle timeout. Subsequent probes will be sent, each ...
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
| } | ||
|
|
||
| bool EnvoyQuicClientSession::ShouldKeepConnectionAlive() const { | ||
| return !disable_keepalive_ && quic::QuicSpdyClientSession::ShouldKeepConnectionAlive(); |
There was a problem hiding this comment.
The docs imply that setting keepalive just causes extra traffic to solicit traffic from the peer, but doesn't directly alter the lifetime of the connection. Please explain what's going on here.
Signed-off-by: Dan Zhang <[email protected]>
|
/retest |
|
Retrying Azure Pipelines: |
|
Ping? |
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
|
@lizan PTAL! |
|
@htuch PTAL |
htuch
left a comment
There was a problem hiding this comment.
API LGTM modulo some docs nits.
Signed-off-by: Dan Zhang <[email protected]>
Signed-off-by: Dan Zhang <[email protected]>
|
/retest |
|
Retrying Azure Pipelines: |
|
/retest |
|
Retrying Azure Pipelines: |
|
@ggreenway you requested change early on. PTAL and merge if it looks okay. |
Signed-off-by: Dan Zhang [email protected]
Commit Message: keepalive probing can be configured in envoy.config.core.v3.QuicProtocolOptions for upstream and downstream. If absent, use the QUICHE default behavior which sends PING frame every 15s on client side and no-op on server side.
Risk Level: low
Testing: added integration tests
Fixes #16751