Dealing with Node.js high CPU in production

Alex Vasilev
Geek Culture
Published in
5 min readAug 16, 2021

--

Let’s assume you have a Node.js service deployed in production, every line of code is reviewed and covered with tests. But with 10 requests per second, the Node.js process begins to consume 100% CPU, or there are some random spikes on a CPU graph, as a result, response time grows and affects all consumers. For sure you can just increase the amount of the running instances, but it’s not a resolution of the problem, the service will behave the same.

--

--