Non-Blocking I/O
noun
say it: “NON-BLOK-ing EYE-OH” /ˌnɑnˈblɑkɪŋ ˌaɪ ˈoʊ/
Starting slow input and output, such as a file read or a network call, without waiting for it, so the program keeps working meanwhile.
What is Non-Blocking I/O?
Non-blocking I/O means Node doesn't wait for files or network calls to finish; it keeps serving other requests, which is why it handles many connections well.
In a sentence
- “Thanks to non-blocking I/O, one Node server handles many visitors while each waits on the database.”
- “readFile from node:fs/promises is non-blocking I/O: the program carries on until the file is ready.”
Level: Journeyman · More Node.js terms at this level
Updated