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

feat(grpc-js): allow configurable http2 initial window size #2864

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rickihastings
Copy link

This PR adds support for setting an initialWindowSize in the http2 session. This fixes #2429, as described in the issue the default window size is 64Kb which is OK for typical http2 use cases but isn't so good for usage inside internal networks with larger response sizes.

I have chosen to add a channel option to implement this as it seemed the most sensible way to make this change. Please advise if there is a better way to achieve this.

Copy link

linux-foundation-easycla bot commented Dec 6, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: rickihastings / name: Ricki Hastings (d08318d)

Copy link
Member

@murgatroid99 murgatroid99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think grpc-node.flow_control_window would be a better option name, to match the Java implementation. If we implement dynamic window sizes in the future, "initial window size" would be a better name for that option, again keeping with the Java implementation.

},
settings: {
initialWindowSize:
options['grpc-node.http2_initial_window_size'] ||
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use ?? instead of || for consistency with the rest of the codebase.

@rickihastings
Copy link
Author

Thanks for the comments, I'll fix these as soon as I can, I'm just waiting for approval from the open source committee in my company.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow configuring HTTP2 initial/local window size
2 participants