Skip to content

Conversation

@Jozott00
Copy link
Collaborator

@Jozott00 Jozott00 commented Nov 5, 2025

Subsystem
gRPC

Problem Description
To reduce latency because of required reconnections to the server, the client sometimes wants to keep a connection open.

Solution
This can be done by setting the keepalive configuration option on the gRPC ClientConfiguration.

GrpcClient("localhost", 50051) {
    keepAlive {
         time = 10.seconds
         timeout = 20.seconds
         withoutCalls = false
    }
}

It also removes some tests that are either duplicates or testing undefined behavior (throwing in onClose of serverInterceptor).

@Jozott00 Jozott00 self-assigned this Nov 5, 2025
@Jozott00 Jozott00 added the feature New feature or request label Nov 5, 2025
@Jozott00 Jozott00 changed the base branch from main to grpc-common November 5, 2025 17:19
@Jozott00 Jozott00 marked this pull request as ready for review November 10, 2025 15:36
@Jozott00 Jozott00 requested a review from Mr3zee November 10, 2025 15:41
Copy link
Member

@Mr3zee Mr3zee left a comment

Choose a reason for hiding this comment

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

Great job!

@Jozott00 Jozott00 merged commit 40c6093 into grpc-common Nov 12, 2025
6 of 7 checks passed
Mr3zee pushed a commit that referenced this pull request Nov 12, 2025
@Jozott00 Jozott00 deleted the grpc/keepalive branch November 12, 2025 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants