Node.js is event-driven, i.e. flow of the program is based on user actions. So Node.js starts the server, performs the initial tasks, starts the event loop and then waits for the event to occur.
Node.js uses single threaded event loop to handle all the requests. Using the non-blocking I/O model, it comes up with the ability to handle a large number of concurrent requests without the need to manage thread concurrency.
Node.js provides access to an enormous number of reusable components through its package manager npm and enhances the developers’ power in this way.
- Suitable for data-intensive apps.
- Known for building efficient and highly scalable apps.
- A good platform to serve real-time apps because of its great performance and reliable service.