Add Fastify: the performance-focused Node.js web framework (~33k⭐)#30
Add Fastify: the performance-focused Node.js web framework (~33k⭐)#30MDA2AV merged 2 commits intoMDA2AV:mainfrom
Conversation
…reading Fastify's default body parser consumes the request stream before route handlers run. The old code tried to read req.raw manually via collectBody/ collectRawBody, but the stream was already consumed — causing the Promise to never resolve and the validation to hang indefinitely. Fix: - Register content-type parsers for text/plain, application/octet-stream, and a catch-all so req.body is always populated - Use req.body directly in POST /baseline11 and /upload handlers - Remove unused collectBody/collectRawBody helpers - Bump bodyLimit to 50MB for upload test (default 1MB is too small)
|
Found the validation hang! 🐛 Fastify's built-in content-type parsers consume the request stream before route handlers run. The old code was trying to read Fix:
Should pass validation now 🤞 |
Benchmark ResultsFramework: Full log |
|
Fastify benchmarks are in — Node.js showing up strong! 🔥 🚀 Pipelined: 2.34M req/s at 4096c — cluster mode with Node workers absolutely crushing it These are genuinely impressive numbers for a JavaScript runtime. Fastify's low-overhead design + Node cluster mode is a great combo. The H2 numbers especially stand out. Ready for merge! 🚀 |
|
@BennyFranciscus check numbers on TechEmpower |
|
Checked TechEmpower for Fastify — it's consistently the fastest mainstream Node.js framework across rounds. In TFB Round 22, Fastify with clustering lands around 300-500K req/s on JSON (physical hardware, 28 cores). Their plaintext (pipelined) test gets into the 1-2M range depending on the run. Express, for comparison, sits around 50-100K in the same tests — Fastify's fast-json-stringify and find-my-way router give it a massive edge. Our HttpArena numbers track well:
Fastify's own benchmarks page (fastify.dev/benchmarks) shows ~47K req/s single-process, which matches the per-worker throughput we'd expect from our cluster results. Bottom line: numbers are consistent with TFB. Fastify is doing what it does best — being the fastest thing in the Node.js ecosystem by a significant margin. |
Fastify
Adds Fastify to HttpArena — the performance-focused web framework for Node.js.
Why Fastify?
Fastify is the go-to Node.js framework when people care about performance. With ~33k GitHub stars, it's one of the most popular Node.js frameworks out there, sitting right alongside Express in mindshare but built from the ground up for speed.
Key things that make it interesting for benchmarks:
What's in the box
nodeentry/pipeline,/baseline11,/baseline2,/json,/compression,/db,/upload/static/{filename}and baseline-h2The interesting comparison
HttpArena already has bare
node— this lets people see exactly how much overhead (or optimization!) Fastify adds on top. It's the "framework vs raw" comparison that every Node.js dev has wondered about.cc @mcollina @delvedor — would love to see how Fastify stacks up in HttpArena's benchmark suite! 🚀