-
Notifications
You must be signed in to change notification settings - Fork 238
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
A49: Dynamic Connection Scaling #276
base: master
Are you sure you want to change the base?
Conversation
A feature to automatically create new connections when the limit of streams on a connection is reached.
7ecf58b
to
832124f
Compare
If I understand this design right, the client needs to get a service config to enable this feature. In my experience, our users often encounter this limit when talking to GFE servers while using Google Cloud API client libraries, or similar. For those users, what do we expect to be the source of the service config? |
Default service config (and optionally disabling name resolver service config) can also be injected by the application. Client libraries already does this, I believe, for other SC features. This is how we plan to enable it there. |
If the expected use case is for users to set this option statically at channel creation time, why not make it just a channel argument? |
The service provider should be in control of the setting, which means service config is the ideal location. |
Subchannels may be shared across channels. The `maxConnectionsPerSubchannel` | ||
setting will be applied to a shared subchannel and that subchannel will use the | ||
highest maximum of all channels currently sharing it. If channels sharing the | ||
subchannel are closed, then the remaining channels' settings will be combined to | ||
determine the new max. If the max is lowered to less than the number of open | ||
connections, the excess connections will not be closed as a result. | ||
Down-scaling will only happen as connections are lost naturally. |
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 think this part can be simplified. In Node, and I think also Core, subchannels are only shared among channels with the same target and channel arguments. Two such channels should never have different service configs except in brief windows when updates may propagate to separate resolvers at slightly different times. So, there probably isn't much value in tracking which setting value is associated with which channel, and instead we can just use the latest value the subchannel has seen from any channel.
OK, then do any of the libraries already have a mechanism for propagating service config updates to subchannels? |
// ... | ||
|
||
// Settings to control dynamic connection scaling. For more details, | ||
// please refer to gRFC AXX (this one; XX = TBD). |
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.
This part needs to use spaces and tabs consistently.
// ... | ||
|
||
// Settings to control dynamic connection scaling. For more details, | ||
// please refer to gRFC AXX (this one; XX = TBD). |
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.
You can fill in the gRFC number now.
// lowering this value. Down-scaling will only happen as | ||
// connections are lost naturally. | ||
// | ||
// Must be a whole number greater than 1. Values higher than |
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.
We should probably allow 1
as well.
A feature to automatically create new connections when the limit of streams on a
connection is reached.