Friday 21 April 2017

How does event loop of nodejs is better performing if under the hood it too creates thread for handling call backs?

How does event loop of nodejs is better performing if under the hood it too creates thread for handling call backs ?

See image below :

enter image description here

If my understanding is correct, then under the hood nodejs too uses threads to handle callbacks and events handling. I know that event loop will keep serving the clients , but the RAM on server will all most be equal as number of threads performing task in each case will be same.

So though nodejs will except 5th request (see image above), but it will not serve 5th client same as regular server!

I might be wrong, but can any one please show me where I am incorrect and explain me how it actually will be efficient.



via user3769778

No comments:

Post a Comment