-
Notifications
You must be signed in to change notification settings - Fork 203
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
Conversation
Please help to take a look and review. |
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); |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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
There was a problem hiding this 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.
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?