docs: warn that Accept-Encoding carries q-values on the static profiles - #1278
Merged
Conversation
The profile sends "br;q=1, gzip;q=0.8". That is ordinary HTTP, but it defeats any static handler matching the encoding by exact token -- a Set built from the split header holds "br;q=1", so asking it for "br" never matches and every response goes out uncompressed. Hono's serveStatic had exactly this and it cost hono-bun about a third of its throughput on #1277 while looking correct in every hand check, because the usual checks send no q-values: curl --compressed sends "deflate, gzip, br, zstd", and a hand-written -H 'Accept-Encoding: br' matches too. Only the load generator sends the real header. Documents the trap and the one-line curl that reproduces it. No runtime code is touched, so the static-tls run on this branch measures what is on main.
Owner
Author
|
Saving the TLS listener for the three Bun entries. /benchmark-multiple -f bun,elysia,hono-bun -t static-tls --save |
Contributor
|
👋 Benchmark request received. A collaborator will review and approve the run. |
Contributor
Benchmark ResultsFrameworks: 3 | Test: ✅
|
| Test | Conn | RPS | CPU | Mem | Δ RPS | Δ Mem |
|---|---|---|---|---|---|---|
| static-tls | 1024 | 491,299 | 6572.7% | 1.2GiB | +116.7% | +26.9% |
| static-tls | 4096 | 474,144 | 6545.2% | 1.2GiB | +113.0% | +24.0% |
| static-tls | 6800 | 463,754 | 6529.3% | 1.2GiB | +110.1% | +9.1% |
✅ elysia
| Test | Conn | RPS | CPU | Mem | Δ RPS | Δ Mem |
|---|---|---|---|---|---|---|
| static-tls | 1024 | 128,254 | 6316.9% | 3.3GiB | +46.6% | -5.7% |
| static-tls | 4096 | 126,943 | 6320.2% | 3.4GiB | +46.7% | -10.5% |
| static-tls | 6800 | 126,580 | 6262.9% | 3.5GiB | +48.2% | -10.3% |
✅ hono-bun
| Test | Conn | RPS | CPU | Mem | Δ RPS | Δ Mem |
|---|---|---|---|---|---|---|
| static-tls | 1024 | 221,383 | 6423.1% | 3.3GiB | -4.9% | +106.2% |
| static-tls | 4096 | 213,275 | 6403.6% | 4.8GiB | -7.3% | +182.4% |
| static-tls | 6800 | 211,148 | 6389.6% | 5.4GiB | -7.3% | +200.0% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #1277, and the vehicle for the
static-tlssave that could not ride along with it.