filmov
tv
NodeJS Architecture - I/O
Показать описание
Node is a non-blocking Javascript runtime. You can concurrently run an HTTP Server, read files from disk, send UDP datagrams, accept TCP connections from clients and still have room to execute Javascript code operations without blocking. Most of these operations are known as I/O, you send an input to a device, file or a socket and it replies back with an output. Node achieves non-blocking I/O with mostly a single thread executed asynchronously using a library called lib_uv.
The exception being DNS queries, which use a thread pool. This means when you use fetch or axios to make an HTTP request to a domain, the DNS resolution for that domain will most probably go through the thread pool, while the actual request itself will be sent asynchronously on the main thread.
In this episode of the backend engineering show I go through an article I wrote discussing NodeJS Asynchronous I/O.
Learn the fundamentals of network engineering, get my udemy course
0:00 Intro
3:00 Part 1 Socket/IO
9:48 Part 2 File I/O
12:42 Part 3 DNS
16:22 Part 4 NodeJS Single Threaded
19:10 Part 5 NodeJS Thread Pool
21:23 Part 6 DNS lookup bottleneck in Node
Fundamentals of Networking for Effective Backends udemy course (link redirects to udemy with coupon)
Fundamentals of Database Engineering udemy course (link redirects to udemy with coupon)
Introduction to NGINX (link redirects to udemy with coupon)
Python on the Backend (link redirects to udemy with coupon)
Become a Member on YouTube
Buy me a coffee if you liked this
Arabic Software Engineering Channel
🔥 Members Only Content
🏭 Backend Engineering Videos in Order
💾 Database Engineering Videos
🎙️Listen to the Backend Engineering Podcast
Gears and tools used on the Channel (affiliates)
🖼️ Slides and Thumbnail Design
Canva
Stay Awesome,
Hussein
The exception being DNS queries, which use a thread pool. This means when you use fetch or axios to make an HTTP request to a domain, the DNS resolution for that domain will most probably go through the thread pool, while the actual request itself will be sent asynchronously on the main thread.
In this episode of the backend engineering show I go through an article I wrote discussing NodeJS Asynchronous I/O.
Learn the fundamentals of network engineering, get my udemy course
0:00 Intro
3:00 Part 1 Socket/IO
9:48 Part 2 File I/O
12:42 Part 3 DNS
16:22 Part 4 NodeJS Single Threaded
19:10 Part 5 NodeJS Thread Pool
21:23 Part 6 DNS lookup bottleneck in Node
Fundamentals of Networking for Effective Backends udemy course (link redirects to udemy with coupon)
Fundamentals of Database Engineering udemy course (link redirects to udemy with coupon)
Introduction to NGINX (link redirects to udemy with coupon)
Python on the Backend (link redirects to udemy with coupon)
Become a Member on YouTube
Buy me a coffee if you liked this
Arabic Software Engineering Channel
🔥 Members Only Content
🏭 Backend Engineering Videos in Order
💾 Database Engineering Videos
🎙️Listen to the Backend Engineering Podcast
Gears and tools used on the Channel (affiliates)
🖼️ Slides and Thumbnail Design
Canva
Stay Awesome,
Hussein
Комментарии