Repository navigation
Conversation
…tuned) vanilla, the V HTTP/1.1 server, as a framework entry routed by http1_1.veb_like: routes are @['METHOD /path'] attributes compiled into a segment trie at startup. 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-router. V 5516000 with its vc snapshot, vanilla fb4c7e7. validate.sh: 79 passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
/benchmark -f vanilla-veb_like |
|
👋 Benchmark request received. A collaborator will review and approve the run. |
Benchmark ResultsFramework:
Full log |
|
/benchmark -f vanilla-veb_like --save |
|
👋 Benchmark request received. A collaborator will review and approve the run. |
|
Hi, can you help me understand the flagship evaluation? This still looks like an engine with some routing on top to me 🤔 |
Here in HttpArena we split things into 2 large categories, frameworks and engines. frameworks include: flagship, emerging, experimental For all frameworks we expect a framework or library that abstracts all the low level transport, routing and http logic, middleware like compression, serialization, etc so that any developer can use it to develop for example a REST api while having to focus only on his application logic. vanilla sits in the engine section because it is a low level solution to build web applications, you handle http, compression and even serialization directly, while you may use it in your own deployments, it is not something sustainable for a large project |
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>
|
Thanks, that makes it clear. By that definition flagship doesn't fit: vanilla isn't V's reference framework (that would be veb), and it doesn't have the years of hardening you describe. I've switched both entries, this one and #1541, to On engine vs framework, the docs read differently to me, and that's why I filed these as frameworks:
What vanilla leaves to the developer (serialization, compression, middleware) is what the completeness factor prices. These entries declare it: ×0.90 for vanilla-router, ×0.925 for this one. If you'd still rather keep vanilla with the engines, I'll follow that. Should these become |
Description
Adds
vanilla-veb_like: vanilla, a multi-threaded HTTP/1.1 server written in V, as a framework entry using its declarative router,http1_1.veb_like.type: emerging,mode: tuned.#1541 adds
vanilla-router, the same app with vanilla's explicit router. The two entries shareapp.vbyte for byte, so the leaderboard compares the two routing styles on identical handlers.Routing
Routes are attributes on the methods of
App(:8080) andTlsApp(:8081):veb_like.newreads the attributes at startup and compiles them into a segment trie, failing on a malformed or conflicting route. Per request, the router does the following::paramswith views of the request buffer;$forover the methods becomes a jump table);Allow, and 501 itself, and serves HEAD from the GET route.Every route goes through the router, on both listeners. There is no fast path ahead of it. A request whose
Connectionheader listsclosegets its response from any route, then the connection closes. That holds for the synchronous and the parked routes alike, but not for the router's own 404/405/501.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: routing istrue, the other three axes arefalse.:paramsand*catch-all, and dispatches to the registered method.vanilla-routerdeclaresrouting: false, because there the app branches on the path segments itself.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-veb_like: 79 passed, 0 failed, withvalidate-frag: 9 passed.site/data/tls/vanilla-veb_like.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