Commit a5a3521
committed
Document turning off websocket frame compression
Chat responses stream as one very small frame per token, and the websocket server compresses each of them separately for every subscriber, which costs processor time while saving almost nothing at that size. UVICORN_WS_PER_MESSAGE_DEFLATE=false declines the extension, and the default keeps the previous behaviour so nothing changes until an operator turns it off.
The reference entry describes the trade, namely that the frames which did compress well are the rare large ones and even a very long reply is only a few hundred kilobytes uncompressed. The scaling guide, the performance troubleshooting page and the multi-replica guide each carry it beside their existing advice on HTTP response compression, which all three already noted does not apply to websocket traffic, and the production checklist lists it alongside the other per-worker savings.1 parent dfd7b0f commit a5a3521
4 files changed
Lines changed: 29 additions & 1 deletion
File tree
- docs
- getting-started/advanced-topics
- reference
- troubleshooting
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
166 | 174 | | |
167 | 175 | | |
168 | 176 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8283 | 8283 | | |
8284 | 8284 | | |
8285 | 8285 | | |
| 8286 | + | |
| 8287 | + | |
| 8288 | + | |
| 8289 | + | |
| 8290 | + | |
| 8291 | + | |
| 8292 | + | |
8286 | 8293 | | |
8287 | 8294 | | |
8288 | 8295 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
| 312 | + | |
| 313 | + | |
312 | 314 | | |
313 | 315 | | |
314 | 316 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
223 | 233 | | |
224 | 234 | | |
225 | 235 | | |
| |||
563 | 573 | | |
564 | 574 | | |
565 | 575 | | |
566 | | - | |
| 576 | + | |
| 577 | + | |
567 | 578 | | |
568 | 579 | | |
569 | 580 | | |
| |||
0 commit comments