The Cost of Logging
summary
A fast JSON logger is built and benchmarked: raw HTTP hits ~21,000 rps, Express ~88,200 rps, adding Bunyan drops throughput to ~2,000 rps while switching to the new logger raises it to ~5,800 rps; claim: 10,000 logs in ~250ms or 10,000 in ~100ms with extreme mode and 4KB batching (risking that amount of data loss). Performance fixes include avoiding JSON.stringify, using epoch timestamps, flat strings, fast-safe-stringify, flame graphs (zx) and autocannon; transports run as separate processes and integrations for Express/Hapi/Koa are provided.
AI-written summary · about
chapters (10)
- 0:00The performance challenge
- 2:27Analyzing logging costs
- 5:20The adapter problem
- 7:38Introducing Pino
- 11:25Framework integration
- 13:31Technical optimizations
- 18:16Performance testing tools
- 20:14Live benchmarking demo
- 25:33Pino usage and ecosystem
- 30:50Closing and Q&A
related talks
30mNode.js Q&A
40mNode.js: Logging
53mMastering Node.js Performance
32mOptimize Your JSON Payload Efficiency x10 times
24m10 things I learned making the fastest JS server runtime in the world
33mReaching Ludicrous Speed
29mA world of Rest APIs ... from Restify to a faster Fastify
53mMastering Node.js Performance
