Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Node JS: Advanced Concepts
Rating: 4.5 out of 5(12,522 ratings)
76,240 students

Node JS: Advanced Concepts

Get advanced with Node.Js! Learn caching with Redis, speed up through clustering, and add image upload with S3 and Node!
Created byStephen Grider
Last updated 2/2026
English

What you'll learn

  • Absolutely master the Event Loop and understand each of its stages
  • Utilize Worker Threads and Clustering to dramatically improve the performance of Node servers
  • Speed up database queries with caching for MongoDB backed by Redis
  • Add automated browser testing to your Node server, complete with continuous integration pipeline setup
  • Apply scalable image and file upload to your app, utilizing AWS S3

Course content

8 sections176 lectures16h 4m total length
  • How to Get Help1:07

    Learn to get help fast using three channels—course discussion boards, Udemy direct messages, and Twitter—plus daily checks Monday through Friday and tips for technical questions.

  • Course Resources0:38
  • Starting With Node Internals3:47

    Explore the internal architecture of Node.js, including the roles of V8 and libuv. See how core modules like http, fs, path, and crypto enable performant JavaScript.

  • Module Implementations8:23

    Explore Node internals by tracing pbkdf2 from the Lib JavaScript definitions to the src implementation via process.binding. See how V8 and libuv power a unified Node api.

  • Node Backed by C++!6:33

    Explore how Node's JavaScript runtime bridges to C++ via process.binding, revealing the PBKDF2 implementation in node_crypto.cc and the roles of V8 and libuv.

  • Test Your Knowledge - Node's Implementation
  • The Basics of Threads6:29

    Explain how threads operate inside a process, how the OS scheduler assigns CPU time, and how adding CPU cores or optimizing IO pauses improves Node's event loop throughput.

  • The Node Event Loop6:34

    Explore how Node.js runs on a single thread and how the event loop drives execution in each tick using a fake code demo in loop.js.

  • The Event Loop Implementation7:22

    Explore how node's event loop decides to continue or exit by evaluating pending timers, os tasks, and long running operations, with arrays tracking each category and fs interactions.

  • Event Loop Ticks6:46

    Explore how the Node event loop processes each tick by checking pending timers and OS tasks, invoking callbacks, pausing, then handling set immediate and close events.

  • Is Node Single Threaded?5:06

    Clarify the misconception that node is fully single-threaded, showing the event loop runs on one thread while some standard library tasks run off it; use a pbkdf2 benchmark to demonstrate.

  • Testing for Single Threads6:49

    Benchmark pbkdf2 performance in node by measuring start and end times and logging results, using two simultaneous calls to determine if node runs on a single thread.

  • The Libuv Thread Pool3:07

    See how the libuv thread pool offloads pbkdf2 work from the event loop to four background threads, revealing concurrent execution beyond the main thread.

  • Threadpools with Multithreading6:06

    Explore how libuv's thread pool offloads expensive work, with five parallel calls to PDK DF two; observe four threads running concurrently, then the fifth completes as cores distribute work.

  • Changing Threadpool Size5:25

    Illustrates how libuv's thread pool processes expensive hashing tasks like PBKDF2, and how setting UV_THREADPOOL_SIZE to two or five alters concurrency, core assignment, and overall timing.

  • Common Threadpool Questions3:16

    Explore how the node thread pool operates, how to run JavaScript code in separate threads, and how the pool affects the event loop via pendingOperations and file system tasks.

  • Explaining OS Operations3:52

    Explore how libuv's thread pool and the pending os tasks affect Node's event loop. Benchmark a node standard library function by fetching google.com with https.request and timing with Date.now.

  • Libuv OS Delegation3:19

    Explore how libuv delegates HTTP requests to the underlying OS, causing multiple requests to complete without blocking the event loop and independent of the Node.js thread pool.

  • OS/Async Common Questions2:40

    Explore how Node.js uses the operating system for async tasks, including networking operations, and see how pending OS tasks feed the event loop to keep servers running.

  • Review2:48

    Review the node startup flow from index.js to the event loop, showing how require executes and how timers, callbacks, and OS tasks drive each tick.

  • Check Your Knowledge - The Event Loop
  • Crazy Node Behavior7:39

    Explore advanced node behavior by merging async.js and threads.js into multitask.js, adding pbkdf2 hashing and fs reads, and analyzing the surprising event loop driven console log order.

  • Unexpected Event Loop Events11:23

    Explore why http requests complete before fs statistics and reads, and how node's threadpool and hashing tasks shape the event loop.

Requirements

  • Basic knowledge of Node, Express, and MongoDB
  • Strong knowledge of Javascript

Description

Go beyond the basics of Node!  This course will give you the skills needed to become a top Node engineer.

Query Caching with Redis? You will learn it.  The Node Event LoopIncluded.  Scalable File UploadOf course!

------------------------------

This is a must-take course if you work with Node.

Node Internals: Here's one of the most common interview questions you'll face when looking for a Node job: "Can you explain Node's Event Loop?There are two types of engineers: those who can describe the Event Loop and those who cannot!  This course will ensure that you are incredibly well prepared to answer that most important question.  Besides being critical for interviews, knowledge of the Event Loop will give you a better understanding of how Node works internally.  Many engineers know not to 'block' the Event Loop, but they don't necessarily understand why.  You will be one of the engineers who can clearly articulate the performance profile of Node and its Event Loop.

Caching with Redis: We'll also supercharge the performance of database queries by implementing caching backed by Redis.  No previous experience of Redis is required!  Redis is an in-memory data store purpose built for solving caching needs.  By adding caching to your application, you can decrease the amount of time that any given request takes, improving the overall response time of your app.

File Upload: There are many resources online that offer suggestions on how to handle file upload, but few show a solution that can truly scale.  Hint: saving files directly on your server isn't a scalable solution!  Learn how to leverage AWS S3 to implement file upload that can scale to millions of users with a few dozen lines of simple code.  Plentiful discussions are included on security concerns with handling uploads, as well.

Continuous Integration Testing: This is a must have feature for any serious production app.  We'll first learn how to test huge swaths of our codebase with just a few lines of code by using Puppeteer and Jest.  After writing many effective tests, we'll enable continuous integration on Travis CI, a popular - and free - CI platform.  Testing can sometimes be boring, so we'll use this section to brush up on some advanced Javascript techniques, including one of the only legitimate uses of ES2015 Proxies that you'll ever see!

------------------------------

Here's what we'll learn:

  • Master the Node Event Loop - understand how Node executes your source code. 
  • Understand the purpose of Node, and how the code you write is eventually executed by  C++ code in the V8 engine
  • Add a huge boost to performance in your Node app through clustering and worker threads
  • Turbocharge MongoDB queries by adding query caching backed by a lightning-fast Redis instance
  • Scale your app to infinity with image and file upload backed by Amazon's S3 file service
  • Implement a continuous integration testing pipeline so you always know your project functions properly
  • Think you know everything there is about managing  cookies and session?  Well, you might, but learn even more!
  • Ensure your app works the way you expect with automated browser testing using Jest and Puppeteer
  • Bonus - learn advanced JS techniques along the way, including where to use ES2015 proxies!

I've built the course that I would have wanted to take when I was learning to Node. A course that explains the concepts and how they're implemented in the best order for you to learn and deeply understand them.

Who this course is for:

  • Anyone who wants a deep mastery of Node
  • Engineers looking to understand the internals of Node
  • Programmers looking to improve Node's performance