[フレーム]
BT

InfoQ Software Architects' Newsletter

A monthly overview of things you need to know as an architect or aspiring architect.

View an example

We protect your privacy.

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Unlock the full InfoQ experience

Unlock the full InfoQ experience by logging in! Stay updated with your favorite authors and topics, engage with content, and download exclusive resources.

Log In
or

Don't have an InfoQ account?

Register
  • Stay updated on topics and peers that matter to youReceive instant alerts on the latest insights and trends.
  • Quickly access free resources for continuous learningMinibooks, videos with transcripts, and training materials.
  • Save articles and read at anytimeBookmark articles to read whenever youre ready.

Topics

Choose your language

InfoQ Homepage News Fastify 3.0 Improves Performance, Logging, Schema, and TypeScript Support

Fastify 3.0 Improves Performance, Logging, Schema, and TypeScript Support

This item in japanese

Jul 19, 2020 2 min read

Write for InfoQ

Feed your curiosity. Help 550k+ global
senior developers
each month stay ahead.
Get in touch

Fastify is an open-source, low-performance overhead Node.js web framework. Fastify version 3 introduces support for running Express applications inside Fastify, adds improvements to logging serialization and schema substitution, and provides better TypeScript definition support.

Fastify remains focused on lightweight performance. According to Fastify's most recent performance metrics, Fastify serves more requests per second than other Node.js frameworks, including Koa, Restify, hapi, Express, and the built-in http.Server. The 3.0 release more than doubles Fastify's requests per second compared to early 2.x versions.

Fastify version 3 improves its type system to support generic constraining and defaulting and more efficient definitions for schema types.

The fastify-express package provides full Express compatibility inside Fastify to ease the transition from Express to Fastify over time.

Validation and serialization receive a significant upgrade in Fastify 3. The setSchemaCompiler and setSchemaResolver options get replaced with the setValidatorCompiler enabling future tooling improvements. Further changes to preParsing and other hooks improve performance and consistency and leverage more of Fastify's internal APIs such as Fastify requests. Similarly, the Fastify logging serializers now use Fastify Request and Reply objects instead of native objects. Existing Fastify users should review the Fastify 3.0 migration guide for a complete list of updates.

Fastify now includes 136 official plugins ranging from features like Next.js server-side rendering, WebSockets, Webpack, and much more. Immediate support for all plugins was a significant priority for the 3.0 release. As explained by Tomas Della Vedova, software engineer at Elastic and Fastify contributor,

I’m very happy about how the @fastifyjs v3 release went. As you might know by now, we have a rather big plugin ecosystem. With v2 we didn’t have a specific plan for the upgrade, so we just released Fastify v2 and then slowly updated all the plugins. This year we started doing prereleases of all plugins, so a user was able to test Fastify v3 by installing the @.next version of every component of their application. Then on the release day, we published the final release of Fastify v3 and @matteocollina and me bumped all the plugins, so old and new users would not experience gaps or unwanted bugs while upgrading. Improvement for next year: automate this step as well!

Learn more about the Fastify 3.0 release from Matteo Collina, technical director at NearForm, Node.js Technical Steering Committee member, and Fastify project lead.

[フレーム]

Or watch a more in-depth introduction to Fastify 3.

[フレーム]

Fastify is open source software available under the MIT license and is part of the OpenJS Foundation. Contributions are welcome and should follow the Fastify contribution guidelines and code of conduct.

Rate this Article

Adoption
Style

Related Content

The InfoQ Newsletter

A round-up of last week’s content on InfoQ sent out every Tuesday. Join a community of over 250,000 senior developers. View an example

We protect your privacy.

BT

AltStyle によって変換されたページ (->オリジナル) /