Skip to content

docs: warn that Accept-Encoding carries q-values on the static profiles - #1278

Merged
MDA2AV merged 2 commits into
mainfrom
docs/accept-encoding-q-values
Aug 23, 2026
Merged

docs: warn that Accept-Encoding carries q-values on the static profiles#1278
MDA2AV merged 2 commits into
mainfrom
docs/accept-encoding-q-values

Conversation

@MDA2AV

@MDA2AV MDA2AV commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Follow-up to #1277, and the vehicle for the static-tls save that could not ride along with it.

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.
@MDA2AV

MDA2AV commented Aug 23, 2026

Copy link
Copy Markdown
Owner Author

Saving the TLS listener for the three Bun entries. static is already saved and correct on main; this is the one still outstanding.

/benchmark-multiple -f bun,elysia,hono-bun -t static-tls --save

@github-actions

Copy link
Copy Markdown
Contributor

👋 Benchmark request received. A collaborator will review and approve the run.

@github-actions

Copy link
Copy Markdown
Contributor

Benchmark Results

Frameworks: 3 | Test: static-tls

bun

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%

@MDA2AV
MDA2AV merged commit 59ae05b into main Aug 23, 2026
@MDA2AV
MDA2AV deleted the docs/accept-encoding-q-values branch August 30, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant