-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[bfetch] set 'X-Accel-Buffering':'no'
to streaming response headers
#139534
Conversation
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.
I think we should merge this anyways, even if it does not help immediately, it is the right header to use here.
@elasticmachine merge upstream |
…-ref HEAD~1..HEAD --fix'
@elasticmachine merge upstream |
'X-Accel-Buffering':no
to streaming response headers
'X-Accel-Buffering':no
to streaming response headers'X-Accel-Buffering':'no'
to streaming response headers
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
Summary
bfetch
streams a list of results back to the end user's browser as soon as possible using HTTP streaming, i.e., it uses Transfer-Encoding: chunked. But it is common for reverse proxies, say Nginx, to (instead of passing through the stream) buffer the stream up to 4 or 8 KiB, and if the request completes within those 4/8 KiB, it instead sets the Content-Length: ... header and sends the whole payload in one go. This is also what is happening in ESE.This pr addes
X-Accel-Buffering: no
to streaming response that tells NGINX not to buffer the response. The plan is to make ESE proxy also respect that header and skip buffering the response.Needed for #139746 (but will actually take effect in ese when cloud's fix lands)
Also would fix streaming responses of all bsearch requests and canvas
Release notes
bfetch
response headers now includeX-Accel-Buffering: no