I am running an express.js server. When I send some load the cpu usage spikes to over 140%.
I understand that since the system I am running the server on has 4 cores so it can go upto 400% as well.
My question is:
- How can node.js application consume more than 100% despite being single threaded?
- To improve the performance should I run the server in cluster mode? Currently a lot of requests are in http_request_waiting state.