Skip to content

Conversation

@YifeiZhuang
Copy link
Member

@YifeiZhuang YifeiZhuang commented Mar 16, 2023

fixes b/259284839

@YifeiZhuang YifeiZhuang changed the title example: add keepalive example examples: add keepalive example Mar 16, 2023
@YifeiZhuang YifeiZhuang force-pushed the fix-keep-alive-inbeded branch from 761a3f1 to f3461b9 Compare March 17, 2023 17:26
Copy link
Contributor

@larry-safran larry-safran left a comment

Choose a reason for hiding this comment

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

A few small comments on wording, please look at them.

// keepAliveTimeout: Wait 1 second for ping ack before considering the connection dead. Set a
// larger value in reality, e.g. 10s. You may only set such small value(e.g. 1s) in certain
// low latency environments.
// keepAliveWithoutCalls: Send pings even without active streams. Normally disable it.
Copy link
Contributor

Choose a reason for hiding this comment

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

s/without active stream/when no streams are active/

// More details see: https://github.com/grpc/proposal/blob/master/A9-server-side-conn-mgt.md
server = Grpc.newServerBuilderForPort(port, InsecureServerCredentials.create())
.addService(new GreeterImpl())
.keepAliveTime(5, TimeUnit.SECONDS)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should put a comment on the line recommending a reasonable value like you did in the client as some people might not read the long comment above.

@YifeiZhuang YifeiZhuang force-pushed the fix-keep-alive-inbeded branch from f3461b9 to fefd310 Compare March 17, 2023 22:33
@YifeiZhuang YifeiZhuang merged commit 4bbee69 into grpc:master Mar 17, 2023
larry-safran pushed a commit to larry-safran/grpc-java that referenced this pull request Mar 20, 2023
larry-safran pushed a commit to larry-safran/grpc-java that referenced this pull request Mar 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 16, 2023
@YifeiZhuang YifeiZhuang deleted the fix-keep-alive-inbeded branch January 9, 2024 19:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants