Fastify logo

Fastify

Fast and low overhead web framework, for Node.js
426
516
+ 1
95

What is Fastify?

Fastify is a web framework highly focused on speed and low overhead. It is inspired from Hapi and Express and as far as we know, it is one of the fastest web frameworks in town. Use Fastify can increase your throughput up to 100%.
Fastify is a tool in the Microframeworks (Backend) category of a tech stack.
Fastify is an open source tool with 32.4K GitHub stars and 2.3K GitHub forks. Here’s a link to Fastify's open source repository on GitHub

Who uses Fastify?

Companies
70 companies reportedly use Fastify in their tech stacks, including payever, Armut, and bee10.

Developers
299 developers on StackShare have stated that they use Fastify.

Fastify Integrations

Node.js, PostGraphile, CQEngine, Swagger Editor, and Apitoolkit are some of the popular tools that integrate with Fastify. Here's a list of all 5 tools that integrate with Fastify.
Pros of Fastify
21
Performance
13
Easy to use
12
Lightweight
9
Open source
9
Middleware
6
Highly customizable
4
Developer friendly
4
Decorators
4
Low overhead
4
Built-in Typescript support
3
Mature
3
Schema based
3
Plugins
Decisions about Fastify

Here are some stack decisions, common use cases and reviews by companies and developers who chose Fastify in their tech stack.

Paul Whittemore
Developer and Owner at Appurist Software · | 15 upvotes · 1.1M views

I'm building most projects using: Server: either Fastify (all projects going forward) or ExpressJS on Node.js (existing, previously) on the server side, and Client app: either Vuetify (currently) or Quasar Framework (going forward) on Vue.js with vuex on Electron for the UI to deliver both web-based and desktop applications for multiple platforms.

The direct support for Android and iOS in Quasar Framework will make it my go-to client UI platform for any new client-side or web work. On the server, I'll probably use Fastly for all my server work, unless I get into Go more in the future.

Update: The mobile support in Quasar is not a sufficiently compelling reason to move me from Vuetify. I have decided to stick with Vuetify for a UI for Vue, as it is richer in components and enables a really great-looking professional result. For mobile platforms, I will just use Cordova to wrap the Vue+Vuetify app for mobile, and Electron to wrap it for desktop platforms.

See more

Fastify's Features

  • 100% asynchronous: all the core is implemented with asynchronous code, in this way not even a millisecond is wasted.
  • Highly performant: as far as we know, Fastify is one of the fastest web frameworks in town, depending on the code complexity we can serve up to 20000 request per second.
  • Extendible: Fastify is fully extensible via its hooks, plugins and decorators.
  • Schema based: even if it is not mandatory we recommend to use JSON Schema to validate your routes and serialize your outputs, internally Fastify compiles the schema in an highly performant function.
  • Logging: logs are extremely important but are costly
  • we chose the best logger to almost remove this cost, Pino!
  • Developer friendly: the framework is built to be very expressive and help the developer in his daily use, without sacrificing performance and security.

Fastify Alternatives & Comparisons

What are some alternatives to Fastify?
Koa
Koa aims to be a smaller, more expressive, and more robust foundation for web applications and APIs. Through leveraging generators Koa allows you to ditch callbacks and greatly increase error-handling. Koa does not bundle any middleware.
Restify
A Node.js web service framework optimized for building semantically correct RESTful web services ready for production use at scale. it optimizes for introspection and performance.
hapi
hapi is a simple to use configuration-centric framework with built-in support for input validation, caching, authentication, and other essential facilities for building web applications and services.
Golang
Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language.
ExpressJS
Express is a minimal and flexible node.js web application framework, providing a robust set of features for building single and multi-page, and hybrid web applications.
See all alternatives

Fastify's Followers
516 developers follow Fastify to keep up with related blogs and decisions.