Skip to content
Preptima
mediumScenarioConceptMidSenior

Your Node service has low CPU but latency spikes for every request at the same moment. What is happening?

Node.js event loop blocking happens when synchronous JavaScript, JSON work, crypto, regex or CPU-heavy code occupies the shared thread. The signal is every endpoint slowing together while event loop delay rises.

4 min readUpdated 2026-08-15

Answer

Short answer

Measure event loop delay first. If all requests stall together, move CPU-heavy work to worker threads or another service, chunk long loops, and replace request-path sync APIs with real asynchronous operations.

Was this answer helpful?

Likely follow-ups

  • Does making the function `async` help? Why not?
  • How would you measure event loop lag in production?
  • When is a worker thread the right answer, and when is it overhead?
  • Which built-in operations block that people assume do not?

Related questions

Further reading