Fastify

Fastify is a web framework for Node.js whose homepage describes it simply as a “Fast and low overhead web framework, for Node.js.” Begun in 2016, it set out to keep the familiar middleware-and-routing model of frameworks like Express while pushing raw throughput and per-request overhead to the limits of what Node could do. The project markets performance as a core part of its identity, citing benchmarks in which Fastify can serve tens of thousands of requests per second depending on application complexity.

The framework’s signature feature is its use of JSON Schema. Routes can declare schemas for their inputs and outputs, and Fastify uses these for two purposes at once. The documentation explains that it is “schema-based,” validating incoming requests against the declared schema and compiling the response schema into a “highly performant function” for serialization. Generating a specialized serializer from a known shape, rather than serializing arbitrary objects generically, is a large part of where Fastify’s speed advantage comes from, and the validation gives correctness guarantees as a side benefit.

Fastify is built around a plugin system and an encapsulation model. Functionality is added through plugins that can register routes, decorators, and hooks, and each plugin can be scoped so that what it adds is visible only within its own context unless deliberately shared. This encapsulation keeps large applications modular and avoids the global-pollution problems that can arise when every plugin mutates a single shared application object.

Performance is pursued throughout the design, not just in serialization. Fastify uses an efficient router, a lifecycle of hooks that fire at well-defined points in request handling, and a logging layer chosen for low overhead. The aim is that the structure encouraging good practice (schemas, plugins, hooks) is also the structure that runs fast, rather than performance being something bolted on afterward.

Fastify became one of the most prominent modern Node frameworks and a common alternative to Express, and its speed and schema model made it attractive enough that higher-level frameworks adopted it as an interchangeable HTTP engine.

Sources

Last verified June 8, 2026