-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
mobile: add knob for h3 keepalive #36646
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Dan Zhang <danzh@google.com>
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to |
mobile/library/cc/engine_builder.cc
Outdated
->mutable_http3_protocol_options() | ||
->mutable_quic_protocol_options(); | ||
quic_protocol_options->mutable_connection_keepalive()->mutable_initial_interval()->set_nanos( | ||
keepalive_initial_interval_ms_ * 1000 * 1000); |
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 default value is 0 in EngineBuilder, this will disable keep alive entirely by default:
// If absent or zero, disable keepalive probing for a server connection. For a client connection, if :ref:`max_interval <envoy_v3_api_field_config.core.v3.QuicKeepAliveSettings.max_interval>` is also zero, do not keepalive, otherwise use max_interval or QUICHE default to probe all the time. |
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.
Actually, it looks like the default is to disable keep alive anyway:
http3_options_->quic_protocol_options().connection_keepalive(), initial_interval, 0); |
I thought we had keep alive but it was some larger value like 15s?
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.
Your first link:
For a client connection, if :ref:`max_interval <envoy_v3_api_field_config.core.v3.QuicKeepAliveSettings.max_interval>` is also zero, do not keepalive, otherwise use max_interval or QUICHE default to probe all the time.
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.
ah yes, sorry I missed that, thanks!
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.
so this appears to pass but I think it's because we disable proto gen validate for Envoy. Aren't you setting it explicitly to zero while retaining a config setting that it is supposed to be GTE some number of nanos? Should the restriction be removed entirely or should we not set it to zero for E-M?
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.
I changed it to check non-zero before setting the protobuf.
test failures look legit though, e.g. https://github.com/envoyproxy/envoy/actions/runs/11369001000/job/31625515074 |
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 api
/lgtm mobile
no relevant owners for "mobile" |
/assign @alyssawilk since it contains core code, Alyssa should merge |
/retest |
Signed-off-by: Dan Zhang <danzh@google.com>
/retest |
Commit Message: add a config knob to Java, Kotlin and C++ engines to set initial interval of QUIC keepalive probing.
Additional Description: also adjust the validation rule of
initial_interval
to be larger than 1ms instead of 1s and fix contradicting documentation.Risk Level: low, interface change
Testing: unit test
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A