-
Notifications
You must be signed in to change notification settings - Fork 95
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
Make gRPC ServerParameters configurable #499
Make gRPC ServerParameters configurable #499
Conversation
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 like this a lot. Please check the default thing, but otherwise I'm ready to approve this.
|
||
# After a duration of this time if the server doesn't see any activity it | ||
# pings the client to see if the transport is still alive. | ||
# If set below 1s, a minimum value of 1s will be used instead. |
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.
According to the docs here, the lower limit is 10s, not 1s, unless I'm reading the wrong thing. Can you check please, and also note the meaning of 0s?
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.
Thanks for pointing that out @kentquirk! Although, it looks like what you linked to is for the ClientParameters
.
I grabbed the comments here for the ServerParameters.
I've also pushed a commit for adding notes about the meaning of 0s!
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.
As per @kentquirk's request. Please check min value and update docs 👍🏻
I think there might be a bug with GitHub. I tried to re-request reviews from both @kentquirk and @MikeGoldsmith but it seems to have removed @emilyashley and then says I need to re-request review from either Kent or Mike. And if I re-request one, the other gets shown as needing a re-request. Whatever GitHub did, I updated the docs and commented about the min value in question! |
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.
Thanks for the updates!
Which problem is this PR solving -------------------------------- At the moment, there is no way to override the ServerParameters used in the `keepalive` configuration of the gRPC server. As to @bdarfler's comments in honeycombio#263, issues can arise where new hosts will never be connected to because clients will reconnect to already existing hosts and by the time replacement hosts are available, all clients will have reconnected to existing hosts with a `MaxConnectionAge`/`MaxConnectionAgeGrace` of [infinity](https://github.com/grpc/grpc-go/blob/60a3a7e969c401ca16dbcd0108ad544fb35aa61c/internal/transport/defaults.go#L36-L37). Short description of the changes -------------------------------- The changes made are to plumb through the configuration of the GRPC ServerParameters from the viper configuration and into the instantiation of the actual gRPC server. These changes kept the previous default configuration of refinery as the defaults of the configurable settings, so anyone who doesn't explicitly override any of these configurations should have exactly the same behavior. Closes honeycombio#263
afe5d56
to
d9d00d7
Compare
Let's explicitly explain what 0 values mean for every field.
d9d00d7
to
7b400f5
Compare
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 great, thanks @abatilo 👍🏻
Which problem is this PR solving
At the moment, there is no way to override the ServerParameters used in
the
keepalive
configuration of the gRPC server. As to @bdarfler'scomments in #263, issues can arise where new hosts will never be
connected to because clients will reconnect to already existing hosts
and by the time replacement hosts are available, all clients will have
reconnected to existing hosts with a
MaxConnectionAge
/MaxConnectionAgeGrace
ofinfinity.
Short description of the changes
The changes made are to plumb through the configuration of the GRPC
ServerParameters from the viper configuration and into the instantiation
of the actual gRPC server. These changes kept the previous default
configuration of refinery as the defaults of the configurable settings,
so anyone who doesn't explicitly override any of these configurations
should have exactly the same behavior.
Closes #263