Skip to content

[chttp2] Add an experiment to separate liveness checks from ping timeouts#34647

Merged
ctiller merged 16 commits intogrpc:masterfrom
ctiller:altalive
Oct 12, 2023
Merged

[chttp2] Add an experiment to separate liveness checks from ping timeouts#34647
ctiller merged 16 commits intogrpc:masterfrom
ctiller:altalive

Conversation

@ctiller
Copy link
Copy Markdown
Member

@ctiller ctiller commented Oct 10, 2023

Just seeing data flowing in after a ping is enough to establish liveness of a connection, and so we can limit keepalive timeouts to that. Ping timeouts are necessary for protocol correctness, but may be stuck behind other traffic, so give them a little more of a grace period.

@ctiller ctiller requested a review from yashykt October 10, 2023 18:41
@ctiller ctiller added the release notes: yes Indicates if PR needs to be in release notes label Oct 10, 2023
@ctiller ctiller requested a review from Vignesh2208 October 12, 2023 14:50
@ctiller ctiller merged commit 594d4ed into grpc:master Oct 12, 2023
@ctiller ctiller deleted the altalive branch October 12, 2023 17:04
grpc_core::RefCountedPtr<grpc_chttp2_transport> t,
grpc_error_handle error) {
// got an incoming read, cancel any pending keepalive timers
t->keepalive_incoming_data_wanted = false;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are already doing this in read_action_parse_loop_locked?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh wait, this is for ping_timeout

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but let's do both in the same place

description:
Keep a different keepalive timeout (resolution is seeing data after sending a ping)
from a ping timeout (resolution is getting a ping ack after sending a ping)
The first can be short and determines liveness.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It took me some time to parse this. Recommend s/first/keepalive\ timeout and s/second/ping\ timeout

@copybara-service copybara-service bot added the imported Specifies if the PR has been imported to the internal repository label Oct 12, 2023
ctiller added a commit to ctiller/grpc that referenced this pull request Oct 20, 2023
…outs (grpc#34647)

Just seeing data flowing in after a ping is enough to establish liveness
of a connection, and so we can limit keepalive timeouts to that. Ping
timeouts are necessary for protocol correctness, but may be stuck behind
other traffic, so give them a little more of a grace period.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
@ctiller ctiller restored the altalive branch April 8, 2024 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bloat/low imported Specifies if the PR has been imported to the internal repository lang/core per-call-memory/neutral per-channel-memory/neutral release notes: yes Indicates if PR needs to be in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants