-
Notifications
You must be signed in to change notification settings - Fork 848
Add transform TSIOBuffer watermark APIs. #4117
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
Conversation
|
[approvie ci] |
|
[approve ci] |
|
sorry. I miss this till now. will review over the weekend. |
|
[approve ci freebsd] |
|
Description and the code makes sense. Will be trying this out over the weekend before merging. |
|
Thanks for taking a look. Let me know if you need anything else to accurately test this patch. The code submitted was used to improve the performance of a broadband speed testing script written in LUA. The upload portion of the script that uses a POST request transform handler to measure speed saw dramatic improvements in speed by setting the watermark to 256kb, 512kb, or 1MB. Do you think I should add a maximum value limit for the watermark? |
|
I think it is ok not to have a max limit at this point. Can you give a simple example script in the doc section to show how to use this this function? |
|
I think everything else looks good. |
|
Cherry picked to 8.1.0 |
|
We probably need this cherry picked in to 8.0.x as well, as of now it only exists on 8.1 |
This feature PR allows a LUA transform handler to set the upstream buffer watermark in units of bytes via the TSIOBufferWaterMarkGet/Set() APIs.
Setting the watermark to values of 256kb, 512kb, or even 1MB seems to dramatically improve the performance of a LUA transform handler when processing high-throughput response body.