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

Add timeout and keep-alive settings for Grpc Client and Server #115

Merged
merged 5 commits into from
Aug 8, 2022

Conversation

mingmwang
Copy link
Contributor

@mingmwang mingmwang commented Aug 5, 2022

Which issue does this PR close?

Closes #114.

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

@mingmwang
Copy link
Contributor Author

@thamht4190 @yahoNanJing

Please help to take a look and review.

@mingmwang mingmwang changed the title Add timeout and keep-alive settings for Grpc Client Add timeout and keep-alive settings for Grpc Client and Server Aug 5, 2022
Comment on lines +324 to +332
let endpoint = tonic::transport::Endpoint::new(dst)?
.connect_timeout(Duration::from_secs(20))
.timeout(Duration::from_secs(20))
// Disable Nagle's Algorithm since we don't want packets to wait
.tcp_nodelay(true)
.tcp_keepalive(Option::Some(Duration::from_secs(3600)))
.http2_keep_alive_interval(Duration::from_secs(300))
.keep_alive_timeout(Duration::from_secs(20))
.keep_alive_while_idle(true);
Copy link
Member

Choose a reason for hiding this comment

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

It would be nice to make these options user-configurable via the recently added config mechanism that was added in DataFusion (but not integrated with Ballista yet).

Copy link
Member

Choose a reason for hiding this comment

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

I filed #117 for this and I plan on picking this up

Copy link
Member

@andygrove andygrove left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me but I have not been working with gRPC lately. Maybe @avantgardnerio could review as well since he is working on Flight SQL support.

@andygrove andygrove merged commit cb6147f into apache:master Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add timeout settings for Grpc Client
2 participants