Skip to content
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

netty should use BDP by default #7007

Closed
creamsoup opened this issue May 5, 2020 · 5 comments · Fixed by #7015
Closed

netty should use BDP by default #7007

creamsoup opened this issue May 5, 2020 · 5 comments · Fixed by #7015
Assignees
Milestone

Comments

@creamsoup
Copy link
Contributor

Since now we expose Netty{Channel,Server}Builder#initialWindowUpdate via #6979. We should use it by default.
We probably need to use smaller windowSize than current DEFAULT_FLOW_CONTROL_WINDOW 1MB.

@creamsoup creamsoup modified the milestones: Next, 1.30 May 5, 2020
@creamsoup creamsoup self-assigned this May 5, 2020
@wujun8
Copy link

wujun8 commented May 6, 2020

@creamsoup Using old versions, from which version manually enable BDP is suggested?

    InternalHandlerSettings.enable(true);	
    InternalHandlerSettings.autoWindowOn(true);

@ejona86
Copy link
Member

ejona86 commented May 6, 2020

We probably need to use smaller windowSize than current DEFAULT_FLOW_CONTROL_WINDOW 1MB.

We will want to reduce the window size, but for now let's keep the initial window size the same. Then over the course of a few releases we could reduce it down to ~64K, which will align with the other languages and greatly reduce the amount of buffering in many systems.

@ejona86
Copy link
Member

ejona86 commented May 6, 2020

@wujun8, the PR mentioned was just recently merged. It isn't available in a release yet. The next release is scheduled for June 2nd.

@wujun8
Copy link

wujun8 commented May 7, 2020

@ejona86 commented on 2020年5月7日 GMT+8 上午12:10:

@wujun8, the PR mentioned was just recently merged. It isn't available in a release yet. The next release is scheduled for June 2nd.

I noticed in other libs using grpc, they never enable the BDP switch, if I manually enable BDP, is it OK in old versions? Doing like this in static block:

    InternalHandlerSettings.enable(true);	
    InternalHandlerSettings.autoWindowOn(true);

@creamsoup
Copy link
Contributor Author

Those internal APIs shouldn't be used by users hence it is internal. It may not work correctly in some environments (that's why the change has some other stuff in it). Unfortunately, java doesn't block you from using it. If you use it, you are on your own.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants