grpc-go
grpc-go copied to clipboard
Provide a way to adjust the initial window size that does not also disable BDP estimation
There are at least a couple options here:
- Change the existing Dial/ServerOptions (e.g.) so they do not disabled BDP estimation
- Optionally, add another set of options that does disable BDP estimation.
- Add new Dial/ServerOptions to set the size like the existing ones, but which do not also disable BDP esimation.
Proposal:
- Add new settings:
package grpc
func WithStaticStreamWindowSize(int32) DialOption
func WithStaticConnWindowSize(int32) DialOption
func StaticStreamWindowSize(int32) ServerOption
func StaticConnWindowSize(int32) ServerOption
These will behave the same as the current options.
- After 2 releases, with a notice that the behavior is changing in the release notes, change the current options so they do not disable BDP estimation. Also add:
func WithInitialStreamWindowSize(int32) DialOption // just does "return WithInitialWindowSize(n)"
func InitialStreamWindowSize(int32) ServerOption // just does "return InitialWindowSize(n)"
And mark WithInitialWindowSize and InitialWindowSize as deprecated.
Rationale:
- The current options' names imply they only affect the starting window size, but that the window size is adjustable. Leaving the behavior the same, and adding new options that specify a starting size but adjust over time would be confusing for everyone.
I'm looking into this. Please assign the issue to me.
@vinothkumarr227 is this issue completely addressed?
@arjan-bal Yeah, this addresses the issue and has also been merged
Hey , @arjan-bal I dont think the 2nd part of this has been addressed i.e.
After 2 releases, with a notice that the behavior is changing in the release notes, change the current options so they do not disable BDP estimation. Also add: func WithInitialStreamWindowSize(int32) DialOption // just does "return WithInitialWindowSize(n)" func InitialStreamWindowSize(int32) ServerOption // just does "return InitialWindowSize(n)" And mark WithInitialWindowSize and InitialWindowSize as deprecated.
Currently the new and the old dialoptions have a same behavior of disabling the BDP estimation. Correct me if I have misunderstood @vinothkumarr227
I see, thanks for catching this!
The new DialOptions will go into 1.74. Based on https://github.com/grpc/grpc-go/issues/7923#issuecomment-2549600066, we will make the behaviour change in 1.76.
Hey , @arjan-bal I dont think the 2nd part of this has been addressed i.e.
After 2 releases, with a notice that the behavior is changing in the release notes, change the current options so they do not disable BDP estimation. Also add: func WithInitialStreamWindowSize(int32) DialOption // just does "return WithInitialWindowSize(n)" func InitialStreamWindowSize(int32) ServerOption // just does "return InitialWindowSize(n)" And mark WithInitialWindowSize and InitialWindowSize as deprecated.
Currently the new and the old dialoptions have a same behavior of disabling the BDP estimation. Correct me if I have misunderstood @vinothkumarr227
yeah , correct
@vinothkumarr227 v1.75 is released, we should be unblocked to make the pending behaviour changes.
Hello! I can pickup the second part of this issue - I'm working it. Please do assign the issue to me.
I also want to point out a current bug (behavior change) that happened as a part of #8283.
The behavior before this PR was:
- disable BDP estimation only if
opts.InitialWindowSize >= 64KB,
The behavior after this was:
WithInitialWindowSizesetsopts.StaticWindowSize = trueregardless of what size was set in argument.- This means, even calling
WithInitialWindowSize(1)would have caused BDP estimation to be disabled. - This is a change in behavior / bug.