Fastify

Fastify is a Node.js web framework built specifically for speed, maintained by the Fastify team under the OpenJS Foundation. It sits around #25 in web framework usage at roughly 2.9% share. It offers a plugin architecture and schema-based request/response validation, aimed at teams that have outgrown Express's raw performance ceiling for high-throughput APIs and want built-in JSON schema validation instead of bolting on a separate library.

Quick facts
Type: Node.js web framework
Made by: OpenJS Foundation / Fastify team
License: Free / open-source (MIT)
Language: JavaScript / TypeScript
Primary use case: High-throughput Node.js APIs needing built-in schema validation and low overhead
Jump to: ExampleGetting startedBest for

Example

Fastify routes can attach a JSON schema, which the framework uses both to validate incoming requests and to serialize the response fast.

const fastify = require('fastify')({ logger: true })

const schema = {
  querystring: {
    type: 'object',
    properties: { name: { type: 'string' } }
  }
}

fastify.get('/greet', { schema }, async (request, reply) => {
  const { name } = request.query
  return { message: `Hello, ${name || 'World'}!` }
})

fastify.listen({ port: 3000 })

Getting started

Add Fastify to a Node project with npm, then write a minimal server file and run it directly with Node.

# install Fastify into a new project
npm init -y
npm install fastify

# run the server
node server.js
Best for: Node.js APIs and microservices where request throughput and validation overhead matter — teams that outgrew Express's performance and want schema validation built in rather than added on.