Jorge Bay - lead engineer for the Node.js and C# client drivers for Apache Cassandra and DSE at DataStax - published article to help you improve performance of Node.js and focus on the most significant areas that could cause throughput degradation.
In order to improve the performance of an application that involves IO, you should understand how your CPU cycles are spent. Article focus on benchmarks, CPU profiling, system calls, Node.js timers and also Ecmascript features and dependencies.
Key Takeaways
- Try to minimize the amount of syscalls by grouping / batching writes.
- Consider the overhead of issuing and clearing the different timers in your application.
- CPU profilers give you useful information but won’t tell you the whole story.
- Be wary of high-level ECMAScript features, especially if you are not using the latest JavaScript engine or a transpiler.
- Control your dependency tree and benchmark your dependencies.