Repository navigation
Conversation
vanilla, the V HTTP/1.1 server, as a framework entry routed by http1_1.router: each route is a match over the path segments. It subscribes to the HTTP/1.1 profiles vanilla-epoll serves, with /json serialized and gzip-compressed per request (libdeflate, level 1) and no response caches. app.v is shared byte for byte with vanilla-veb_like. V 5516000 with its vc snapshot, vanilla fb4c7e7. validate.sh: 79 passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
enghitalo
requested review from
Kaliumhexacyanoferrat and
MDA2AV
as code owners
October 9, 2026 15:34
Contributor
Author
|
/benchmark -f vanilla-router |
Contributor
|
👋 Benchmark request received. A collaborator will review and approve the run. |
Contributor
Benchmark ResultsFramework:
Full log |
Contributor
Author
|
/benchmark -f vanilla-router --save |
Contributor
|
👋 Benchmark request received. A collaborator will review and approve the run. |
Per review: flagship is reserved for a language's reference framework (aspnet for C#, actix for Rust). vanilla runs production services but is young and has no ecosystem, which is what emerging describes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Description
Adds
vanilla-router: vanilla, a multi-threaded HTTP/1.1 server written in V, as a framework entry using its explicit router,http1_1.router.type: emerging,mode: tuned.#1542 adds
vanilla-veb_like, the same app with vanilla's declarative router. The two entries shareapp.vbyte for byte, so the leaderboard compares the two routing styles on identical handlers.Routing
Each route is a
matchover the request's path segments.router.methodreads the method androuter.pathreturns a zero-copy cursor over the path:Every route goes through the router, on both listeners. There is no fast path ahead of it. A known path under the wrong method gets 405 with
Allow. A request whoseConnectionheader listsclosegets its response, then the connection closes, on the synchronous and the parked routes alike.Profiles
The full HTTP/1.1 set:
What each route does:
/json/{count}is serialized per request from the dataset's fields. WhenAccept-Encodingaccepts gzip, it is compressed per request with libdeflate, at level 1. On the 50-item body, level 1 takes 15 µs for 1708 bytes and level 6 takes 38 µs for 1478 bytes. Compression is most of the request, and json-comp scores rps × ratio², so level 1 comes out ahead. Brotli is slower at every size on these 4 to 8 KB bodies.pg_async, until the reply arrives. Each worker has its own pipelined pool, sized fromDATABASE_MAX_CONN. fortunes adds the runtime row, sorts, and renders the page by hand per request, every message HTML-escaped./delay/{ms}parks on a one-shot timerfd from a per-worker free-list./static/*goes through vanilla'sstatic_assets. It picks the.br/.gzsibling perAccept-Encodingand re-checks each file against the disk (onestatper 100 ms). Bodies of 16 KiB or more go out withsendfile(2), over kTLS on:8081.:8081is TLS 1.3 with ALPNhttp/1.1through Mbed TLS 4, built as invanilla-epoll.Unlike the
vanilla-epollengine entry, nothing is cached and nothing is pre-serialized. There is no gzip response cache, no JSON prefixes, and no skip-parse path for/pipeline.Type, mode, completeness
type: emerging. vanilla runs production services, but it is young and has no ecosystem. These entries were first filed as flagship; flagship is for a language's reference framework (see the discussion in Add vanilla-veb_like (vanilla with its declarative router; emerging, tuned) #1542).mode: tuned. The JSON and HTML are written by hand, compression uses libdeflate, and the build uses-gc none. vanilla has no JSON serializer, template engine or compression middleware of its own, so Standard's per-profile rules can't be met as written.completeness: all four axes are declaredfalse.vanilla-veb_likedeclaresrouting: true.Build
5516000(0.5.2), built from source. The bootstrap is pinned to vc104d76c3, which vc generated from that same V commit, and tccbind6e7ac1b, built withmake local=1.fb4c7e7, the first commit with both routers.-prod -gc none. Each worker reuses its buffers. Measured with an LD_PRELOAD malloc counter after warm-up:qsorttakes one scratch buffer and frees it;Validation
Run locally on this branch:
validate.sh vanilla-router: 79 passed, 0 failed, withvalidate-frag: 9 passed.site/data/tls/vanilla-router.jsonis the record the validator wrote.PR Commands — comment on this PR to trigger (requires collaborator approval):
/benchmark -f <framework>/benchmark -f <framework> -t <test>/benchmark -f <framework> --save/benchmark -f <framework> -t <test> --save/benchmark -f <framework> --compare <other>/benchmark-multiple -f <fw1>,<fw2>,...-tand--savetoo; saved results land in a single commit/benchmark-multiple --save-fneeded: benchmark and save every framework the PR touches/benchmark-test -t <test><test>and save the results🤖 Generated with Claude Code