http-networkingAnswer last reviewed July 2026

Express versus Fastify versus raw http. How much is the framework layer actually costing you, and when does that cost even matter?

Strong candidates measure framework overhead against a real workload and can point at where Express and Fastify actually spend their time.

What an AI-prepared candidate might say

Raw Node http is the fastest since nothing sits on top of it, but then you're writing routing and parsing yourself. Express is the most popular framework, it gives you routing and middleware and a lot of convenience at some performance cost, because every request passes through its middleware stack. Fastify is the one built for performance, it benchmarks faster than Express, mostly down to a more efficient router and fast JSON serialization. In benchmarks it handles more requests per second than Express on simple routes. Whether you'd actually notice depends on the workload though. If each request does a database query or calls another service, that I/O usually dominates and the framework overhead is a small fraction of the total. So basically you pick a framework for its libraries and developer experience, and you only worry about raw overhead when you're serving very high volumes of lightweight requests.

Senior
Locked

Where the framework's time really goes, route matching, the middleware chain, serialization, and why schema-compiled JSON is Fastify's actual edge over Express.

Unlock the depth
Staff
Locked

When framework overhead is a rounding error next to your real latency and when it genuinely matters, measured on your own workload instead of a hello-world.

Unlock the depth
Follow-up chain
Express versus Fastify versus raw http. How much is the framework layer actually costing you, and when does that cost even matter? | NodeBook