Every decision in the Fastify framework and its official plugins is guided by the following technical principles:
- “Zero” overhead in production
- “Good” developer experience
- Works great for small & big projects alike
- Easy to migrate to microservices (or even serverless) and back
- Security & data validation
- If something could be a plugin, it likely should be
- Easily testable
- Do not monkeypatch core
- Semantic versioning & Long Term Support
- Specification adherence
"Zero" Overhead in Production
"Good" Developer Experience
Fastify aims to provide the best developer experience at the performance point it is operating. It provides a great out-of-the-box experience that is flexible enough to be adapted to a variety of situations.
Works great for small and big projects alike
We recognize that most applications start small and become more complex over time. Fastify aims to grow with the complexity of your application, providing advanced features to structure your codebase.
Easy to migrate to microservices (or even serverless) and back
How you deploy your routes should not matter. The framework should "just work".
Security and Data Validation
Your web framework is the first point of contact with untrusted data, and it needs to act as the first line of defense for your system.
If something could be a plugin, it likely should
We recognize that there are an infinite amount of use cases for an HTTP framework for Node.js. Catering to them in a single module would make the codebase unmaintainable. Therefore we provide hooks and options to allow you to customize the framework as you please.
Testing Fastify applications should be a first-class concern.
Do not monkeypatch core
Monkeypatch Node.js APIs or installing globals that alter the behavior of the runtime makes building modular applications harder, and limit the use cases of Fastify. Other frameworks do this and we do not.
Semantic Versioning and Long Term Support
We provide a clear Long Term Support strategy so developers can know when to upgrade.
In doubt, we chose the strict behavior as defined by the relevant Specifications.