Event Loop Deep Dive
-
Explain the phases of the Node.js event loop
-
Difference between process.nextTick() and setImmediate()
-
Difference between setImmediate() and setTimeout()
-
How does Node.js prioritize async operations?
-
What happens if the event loop is blocked?
-
How do you detect event loop blocking?
-
What is starvation in Node.js?
libuv, Threads & Concurrency
-
What is libuv?
-
How does libuv interact with the OS?
-
What is a thread pool?
-
Which library manages the thread pool in Node.js?
-
How does Node.js handle I/O operations internally?
-
Is Node.js truly single-threaded?
-
What are worker threads?
-
When should you use worker threads?
-
What is clustering in Node.js?
-
How does clustering improve performance?
-
Difference between cluster and worker threads
Child Processes
-
What is child_process in Node.js?
-
What is fork in Node.js?
-
Difference between spawn() and fork()
-
How does Node.js handle child processes?
Express, APIs & Middleware
-
Difference between application-level and router-level middleware
-
What is error-handling middleware?
-
What is next() in Express?
-
How does Express handle async errors?
-
What is request–response lifecycle in Express?
-
What is body-parser?
-
How do you handle errors gracefully in Express?
-
How do you implement authentication in Node.js?
-
How do you manage sessions in Node.js?
-
What is Passport.js?
-
What is CORS?
-
How do you handle CORS?
Security
-
What are common security vulnerabilities in Node.js?
-
How do you secure cookies against XSS?
-
What is CSRF and how do you prevent it?
-
What is rate limiting?
-
What is Helmet and why is it used?
-
How do you securely store passwords?
-
How do you manage secrets and configuration?
Testing & Quality
-
What is a stub?
-
What is mocking?
-
Difference between unit, integration, and end-to-end tests
-
What is a test pyramid?
-
What is code coverage?
-
How do you test asynchronous functions?
-
What tools ensure consistent code style?
Databases & Integration
-
Difference between SQL and NoSQL databases
-
How does Node.js connect to databases?
-
Can Node.js support JSON-based databases?
-
How does Node.js communicate with external services?