Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

danzh2010
Copy link
Contributor

@danzh2010 danzh2010 commented Oct 16, 2024

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

Signed-off-by: Dan Zhang <danzh@google.com>
Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy/|docs/root/api-docs/).
envoyproxy/api-shepherds assignee is @abeyad
CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).

🐱

Caused by: #36646 was opened by danzh2010.

see: more, trace.

->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);
Copy link
Contributor

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.
.

Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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!

Copy link
Contributor

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?

Copy link
Contributor Author

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.

@abeyad
Copy link
Contributor

abeyad commented Oct 16, 2024

test failures look legit though, e.g. https://github.com/envoyproxy/envoy/actions/runs/11369001000/job/31625515074

Signed-off-by: Dan Zhang <danzh@google.com>
abeyad
abeyad previously approved these changes Oct 16, 2024
Copy link
Contributor

@abeyad abeyad left a 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

Copy link

no relevant owners for "mobile"

🐱

Caused by: a #36646 (review) was submitted by @abeyad.

see: more, trace.

@abeyad
Copy link
Contributor

abeyad commented Oct 16, 2024

/assign @alyssawilk

since it contains core code, Alyssa should merge

@danzh2010
Copy link
Contributor Author

/retest

Signed-off-by: Dan Zhang <danzh@google.com>
@danzh2010
Copy link
Contributor Author

/retest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants