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

make bufferSize configurable for default buffer pool in Http2Client #299

Closed
stevehu opened this Issue Sep 29, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@stevehu
Contributor

stevehu commented Sep 29, 2018

The current default value is 24*1024 which is big enough for most of the applications. However, for certain apps with big request body, we need to increase it so that it can hold the entire request. The drawback is that more memory will be used especially you have one big request with other small requests. One option is to split the service into two so that they can have their buffer size setup closer to the request size.

In the client.yml we have added the following in the beginning.

# Buffer Size in the buffer pool in KB. If should be bigger than your request or response body size.
bufferSize: 80

If this config variable is missing, then default 24 will be used.

We also consolidate the BUFFER_POOL and make the POOL and SSL_BUFFER_POOL deprecated. Now they are just alias of BUFFER_POOL and will be removed in 2.x release.

@stevehu

This comment has been minimized.

Contributor

stevehu commented Sep 29, 2018

stevehu added a commit that referenced this issue Sep 29, 2018

@NicholasAzar

This comment has been minimized.

Member

NicholasAzar commented Oct 2, 2018

Shouldn't this be changed in all repo's that reference Http2Client.POOL?
I.e. documentation, examples, test cases, etc..

NicholasAzar added a commit to networknt/light-consumer-4j that referenced this issue Oct 2, 2018

@stevehu

This comment has been minimized.

Contributor

stevehu commented Oct 2, 2018

Yes. I will create a light-bot regex-replace to update every repo in networknt and lightapi. There are 100s projects in light-example-4j and I cannot update them manually. It won't be a problem if existing projects are not updated. The default value is set as 24K and it should be enough for most applications.

@stevehu stevehu closed this in 08fcb57 Oct 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment