Skip to content

Conversation

@glbrntt
Copy link
Collaborator

@glbrntt glbrntt commented Jan 24, 2024

Motivation:

Clients can be configured to use keepalive which periodically sends PING frames to the server, typically only if streams are open, but this behaviour is configurable. Clients should also close connections after periods of inactivity (if no streams are open).

Modifications:

Add a client channel handler and state machine which handles client side keepalive and connection idling.

The handler also emits connection events to the next handler, these events can be used to determine whether to take the connection out of service (i.e. stop creating new streams on it).

Results:

The client can manage keepalive and connection idling.

Motivation:

Clients can be configured to use keepalive which periodically sends
PING frames to the server, typically only if streams are open, but this
behaviour is configurable. Clients should also close connections
after periods of inactivity (if no streams are open).

Modifications:

Add a client channel handler and state machine which handles client
side keepalive and connection idling.

The handler also emits connection events to the next handler, these
events can be used to determine whether to take the connection out of
service (i.e. stop creating new streams on it).

Results:

The client can manage keepalive and connection idling.
@glbrntt glbrntt added the version/v2 Relates to v2 label Jan 24, 2024
@glbrntt glbrntt requested a review from gjcairo January 24, 2024 15:22
@glbrntt glbrntt requested a review from gjcairo January 29, 2024 09:34
Copy link
Collaborator

@gjcairo gjcairo left a comment

Choose a reason for hiding this comment

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

LGTM!

@glbrntt glbrntt enabled auto-merge (squash) January 29, 2024 10:38
@glbrntt glbrntt merged commit 9499327 into grpc:main Jan 29, 2024
glbrntt added a commit to glbrntt/grpc-swift that referenced this pull request Feb 5, 2024
Motivation:

Clients can be configured to use keepalive which periodically sends
PING frames to the server, typically only if streams are open, but this
behaviour is configurable. Clients should also close connections
after periods of inactivity (if no streams are open).

Modifications:

Add a client channel handler and state machine which handles client
side keepalive and connection idling.

The handler also emits connection events to the next handler, these
events can be used to determine whether to take the connection out of
service (i.e. stop creating new streams on it).

Results:

The client can manage keepalive and connection idling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

version/v2 Relates to v2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants