Sitemap

Only at Node.js Interactive: Matteo Collina & His Quest to Write the Fastest Node.js Logger

Node.js
3 min readAug 31, 2016
*Matteo Collina giving a presentation at Node.js Interactive 2015 in Portland, Ore., last year.

With Node.js Interactive only three weeks away you’ll soon get to hear from Matteo Collina, a software architect at nearForm, IoT consultant and author of the Node.js MQTT Broker, Mosca, and of the LevelGraph database. He also is co-author of the book “Javascript: Best Practices” edited by FAG, Milan.

In his talk “The Cost of Logging” Matteo will chronicle his quest to write the fastest possible Node.js logger imaginable and introduce you to Pino.

For any DevOps professional who has ever faced a Sunday morning phone call with the disappointing news that production is down, this is the talk for you.

While you may have smartly added logging to spot problems and improve performance, you ultimately found routes logging more errors became the slowest ones. Moreover, disabling logging actually allowed far greater performance. So what’s the best solution?

This was one of many challenges Matteo encountered as he set out to help Net-A-Porter, one of the UK’s top online fashion brands, improve performance of its existing Node.js system.

With no existing solution up to the task, Matteo teamed up with David Mark Clements on his journey. Working with Dave, Matteo wrote Pino, Italian for the pine tree in front of his house, which today is the fastest Node.js logger — up to 17 times faster than traditional loggers. It’s 99 percent API-compliant with Bunyan and Bole and logs in JavaScript Object Notation (JSON), the developer-friendly universal log format. While you can use Pino directly, if you prefer working with a Web framework, it comes with nice Express and Hapi integrations.

So, what type of performance results can you expect? With Pino and these new techniques, Matteo’s team has been able to reduce the overhead of logging by 40 to 60 percent and increase the throughput of applications by a factor of 20–100 percent. If this isn’t enough to convince you to check out his talk, full performance benchmarks are available here and here.

*Diagram of the benefits that Net-A-Porter experienced with Pino

Don’t miss out on this and other perspectives that you’ll only find at Node Interactive. Register today!

--

--

Node.js
Node.js

Written by Node.js

Node.js is a collaborative open source project dedicated to building and supporting the Node.js platform. https://nodejs.org/en/

No responses yet