-
Notifications
You must be signed in to change notification settings - Fork 4.5k
grpc: introduce new DialOption and ServerOption to configure initial window size without disabling BDP estimation. #8283
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
Changes from 34 commits
0c8d8c3
3f776f2
a55c070
21f3aae
68f1322
699cb70
ab9e865
e72ed5b
541c8ce
5f9eeb4
2cb07fd
d077278
b2c9036
22cf9e1
2d3f20d
b94efb5
d05b590
c127d5f
21da04b
909bf84
e54e81b
d21bc12
cfaf50d
b422fce
605c49d
7a77cde
127227a
ac71fae
e5b7e2b
d3a6773
0b2d748
a3c4701
9abcf34
838385e
7ba8859
382ef30
48c91da
cf685db
35a2253
6ec9e7d
efe83f4
6d355fb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -450,22 +450,23 @@ const ( | |
|
||
// ServerConfig consists of all the configurations to establish a server transport. | ||
type ServerConfig struct { | ||
MaxStreams uint32 | ||
ConnectionTimeout time.Duration | ||
Credentials credentials.TransportCredentials | ||
InTapHandle tap.ServerInHandle | ||
StatsHandlers []stats.Handler | ||
KeepaliveParams keepalive.ServerParameters | ||
KeepalivePolicy keepalive.EnforcementPolicy | ||
InitialWindowSize int32 | ||
InitialConnWindowSize int32 | ||
WriteBufferSize int | ||
ReadBufferSize int | ||
SharedWriteBuffer bool | ||
ChannelzParent *channelz.Server | ||
MaxHeaderListSize *uint32 | ||
HeaderTableSize *uint32 | ||
BufferPool mem.BufferPool | ||
MaxStreams uint32 | ||
ConnectionTimeout time.Duration | ||
Credentials credentials.TransportCredentials | ||
InTapHandle tap.ServerInHandle | ||
StatsHandlers []stats.Handler | ||
KeepaliveParams keepalive.ServerParameters | ||
KeepalivePolicy keepalive.EnforcementPolicy | ||
InitialWindowSize int32 | ||
dfawley marked this conversation as resolved.
Show resolved
Hide resolved
|
||
InitialConnWindowSize int32 | ||
WriteBufferSize int | ||
ReadBufferSize int | ||
SharedWriteBuffer bool | ||
ChannelzParent *channelz.Server | ||
MaxHeaderListSize *uint32 | ||
HeaderTableSize *uint32 | ||
BufferPool mem.BufferPool | ||
UseDynamicWindowSizing bool | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The problem with this name is the default behavior (disabled) is not our current default (enabled). So let's rename these to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the feedback!, I've renamed it to StaticWindowSize for clarity and to better reflect the actual default behavior. The code has been updated accordingly. |
||
} | ||
|
||
// ConnectOptions covers all relevant options for communicating with the server. | ||
|
@@ -504,6 +505,8 @@ type ConnectOptions struct { | |
MaxHeaderListSize *uint32 | ||
// The mem.BufferPool to use when reading/writing to the wire. | ||
BufferPool mem.BufferPool | ||
// UseDynamicWindowSizing controls whether dynamic window sizing is enabled. | ||
UseDynamicWindowSizing bool | ||
} | ||
|
||
// WriteOptions provides additional hints and information for message | ||
|
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 logic is wrong now.
dynamicWindow
can be removed, andopts.Use...
can be used in its place. Same on the server.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, I've updated the code accordingly