Node.js
Installing
Installing on Linux is simple, it will use nvm
which is node version manager
:
Check version with:
Optimizations
Async IO
The need of non Blocking IO
If a user has sent a request to the server to receive data, but the server takes sometime to get and serve this data, what should the server do in the meantime? Hold the socket wnd wait for the data?
Doing this would block the IO for this user's request and waist valuable CPU time.
In order to execute any task, a thread is required, whether it is waiting for data, writing to a file, or reading from a something. Scaling an application using this synchronous model can be difficult.
Worker Threads (Multitasking)
Last updated