A kind person took the trouble to describe the problem with code examples.
Respect and uvazhuha))
Adelia_Johnson answered on March 23rd 20 at 19:51
For example read a file using readFileSync with some brake filesystem, but this time you have a thousand requests come in and a node is busy, it waits for the file.
And could use readFile, and while the file somewhere open, Noda requests could be processed.
Any request to external resources should be asynchronous.
As heavy calculations (huge loops for example) you need to break to call Korbakov (setImmediate) to processed some current operations in between.
lynn.Tillman15 answered on March 23rd 20 at 19:53
Don't know about the locking of the output stream, but I know that if your synchronous code has operations like read from database, write the file somewhere on the hard drive, all sorts of network operations, it is recommended to use asynchronous code.
Those operations may slow down the implementation of all code that is causing the idle processor.
Asynchronous and need to, for example, when recording a file on the hard drive CPU is not idle, waiting for the end of recording the file and performed some kind of code.