mirror of
https://github.com/open-webui/docs.git
synced 2026-07-20 15:38:19 -04:00
[PR #308] [MERGED] Improve nginx config to support better streaming response from models #395
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/docs/pull/308
Author: @diwakar-s-maurya
Created: 11/30/2024
Status: ✅ Merged
Merged: 12/9/2024
Merged by: @tjbck
Base:
main← Head:main📝 Commits (1)
6eb55d4Improve nginx config to support better streaming response from models📊 Changes
2 files changed (+6 additions, -0 deletions)
View changed files
📝
docs/tutorials/integrations/tab-nginx/LetsEncrypt.md(+3 -0)📝
docs/tutorials/integrations/tab-nginx/SelfSigned.md(+3 -0)📄 Description
By default, proxy buffer is turned on in nginx with size of 4KB or 8KB. https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffers
If proxy buffer is turned on, nginx will buffer data received from openwebui and then relay it to user's browser in chunks of 4KB/8KB. This means that when model is returning a streaming response, on browser it is not visible as fluid as it should be. The model response is displayed in chunks and UX is not as beautiful. This only happens if nginx is introduced as a reverse-proxy in between. It does not happen when openwebui is used directly.
This can be easily fixed by turning proxy buffering off. The response received from openwebui is relayed to user's browser immediately, removing the jankiness and restoring the fluid stream of text on browser.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.