07 November 2020

#NodeJs

#NodeJs

Key Concepts


Level Subtopic Topics (Grouped)
Basic Introduction & Fundamentals What is Node.js, V8 Engine, Event Loop Basics, Single-threaded Model
Modules & Packages CommonJS vs ES Modules, require vs import, NPM, Yarn, Package.json
Core Modules fs, path, os, events, util, crypto (basics)
Asynchronous Programming Callbacks, Promises, async/await
HTTP & Networking Creating HTTP Server, Routing, Query Params, Basic REST APIs
File I/O Reading/Writing Files, Streams, Buffers
Intermediate Event Loop & Internals Phases of Event Loop, Microtasks vs Macrotasks, setImmediate vs process.nextTick
Error Handling try/catch with async, EventEmitter errors, Centralized error handling
Express.js Framework Middleware, Routing, Error Handling, Template Engines
Databases MongoDB, PostgreSQL, MySQL with Node.js, ORMs (Sequelize, TypeORM)
Authentication & Authorization Sessions, Cookies, JWT, OAuth2
Testing Mocha, Chai, Jest, Supertest, Test doubles (stubs/mocks)
Advanced Streams & Buffers (Advanced) Backpressure, Piping, Duplex & Transform Streams
Cluster & Child Processes Worker Threads, Clustering, IPC Communication
Scalability Patterns Load Balancing, Reverse Proxy with Nginx, Horizontal Scaling
Security Helmet, Rate Limiting, Input Validation, Preventing XSS/CSRF/SQL Injection
Performance Optimization Profiling with Clinic.js, Memory Leaks, Benchmarking
APIs & GraphQL REST Best Practices, GraphQL with Apollo/Express
Package Management Monorepos, npm workspaces, pnpm, dependency auditing
Logging & Monitoring Winston, Morgan, PM2 Logs, ELK/EFK Stack
Expert Node.js Internals V8 Engine Internals, Libuv, C++ Addons
Concurrency Models Async Hooks, Worker Threads Advanced, SharedArrayBuffer
Microservices Architecture gRPC, Message Queues (RabbitMQ, Kafka), Service Discovery
Serverless Node.js AWS Lambda, Azure Functions, Google Cloud Functions
DevOps & Deployment Dockerizing Node.js, Kubernetes, CI/CD Pipelines
Security (Advanced) TLS/SSL, Zero Trust, Secure Coding Guidelines, Static Analysis Tools
Enterprise Patterns Domain-Driven Design (DDD), Clean Architecture, CQRS, Event Sourcing
Observability OpenTelemetry, Distributed Tracing, Metrics, Health Checks
Large Scale Node.js Monolith to Microservices Migration, Performance at Scale, Multi-tenant Systems

Interview question

Basic

  1. What is Node.js and how is it different from traditional web servers?
  2. Explain the role of V8 JavaScript engine in Node.js.
  3. What are the main features of Node.js?
  4. What is npm in Node.js?
  5. Explain the difference between Node.js and JavaScript in the browser.
  6. What is the purpose of package.json file?
  7. What is the difference between dependencies and devDependencies?
  8. What is an event loop in Node.js?
  9. What is a callback function? Provide an example.
  10. Explain synchronous vs asynchronous programming in Node.js.
  11. How do you install a package globally and locally using npm?
  12. What is the purpose of require() in Node.js?
  13. What is the difference between CommonJS and ES Modules?
  14. Explain how to read and write files using Node.js.
  15. What is a stream in Node.js? Name its types.
  16. How do you handle errors in Node.js?
  17. What is the difference between process.nextTick() and setImmediate()?
  18. What is REPL in Node.js?
  19. How do you exit from REPL?
  20. Explain how Node.js handles child processes.
  21. What is the difference between blocking and non-blocking code?
  22. How to create a simple HTTP server in Node.js?
  23. What is the purpose of Buffer class in Node.js?
  24. Explain the difference between fs.readFile and fs.readFileSync.
  25. How do you manage environment variables in Node.js?

Intermediate (26?50)

  1. What is middleware in Node.js?
  2. How does Express.js work in Node.js?
  3. Explain routing in Express.js with an example.
  4. What is CORS and how do you enable it in Node.js?
  5. How do you handle file uploads in Node.js?
  6. What are Promises in Node.js?
  7. Explain async/await with example in Node.js.
  8. How does event-driven programming work in Node.js?
  9. What is the role of cluster module?
  10. What is the difference between spawn and fork methods?
  11. How do you connect Node.js with MongoDB?
  12. What is Mongoose in Node.js?
  13. How do you connect Node.js with MySQL?
  14. What is JWT and how is it used in Node.js?
  15. Explain how sessions and cookies work in Node.js.
  16. How do you implement authentication in Node.js?
  17. What is Passport.js in Node.js?
  18. How do you handle exceptions globally in Node.js?
  19. What is Helmet.js and why is it used?
  20. How do you use dotenv in Node.js?
  21. Explain the difference between process.env and config module.
  22. What are worker threads in Node.js?
  23. What is Nodemon and why is it useful?
  24. How do you implement logging in Node.js applications?
  25. What is PM2 and how do you use it?

Advanced

  1. What is the internal architecture of Node.js?
  2. Explain the phases of event loop in Node.js.
  3. How does garbage collection work in Node.js?
  4. What is libuv and what role does it play?
  5. Explain the difference between microtasks and macrotasks.
  6. What is a memory leak in Node.js? How do you detect it?
  7. How do you optimize performance in Node.js applications?
  8. Explain clustering and load balancing in Node.js.
  9. What is Zero Downtime Deployment in Node.js?
  10. What is rate limiting and how to implement it in Node.js?
  11. How do you prevent SQL injection in Node.js?
  12. Explain the use of async hooks in Node.js.
  13. How do you debug Node.js applications?
  14. What is the difference between process.on('uncaughtException') and process.on('unhandledRejection')?
  15. What is TLS/SSL and how do you implement HTTPS in Node.js?
  16. How do you implement WebSockets in Node.js?
  17. What is Socket.IO and how does it differ from WebSockets?
  18. How do you test Node.js applications (unit/integration)?
  19. What is Mocha, Jest, and Chai in Node.js testing?
  20. How do you implement clustering with PM2?
  21. Explain the concept of backpressure in Node.js streams.
  22. What is the difference between Readable and Duplex streams?
  23. How do you monitor performance metrics in Node.js?
  24. What are async iterators in Node.js?
  25. Explain the use of EventEmitter in detail.

Expert

  1. Explain the Node.js module resolution algorithm.
  2. How does Node.js handle concurrency internally?
  3. What are native addons in Node.js?
  4. How do you build a custom C++ addon for Node.js?
  5. What are worker pools in libuv?
  6. Explain the difference between cooperative multitasking and preemptive multitasking in Node.js.
  7. How do you handle high throughput real-time applications in Node.js?
  8. What are observables and how do they compare to Promises in Node.js?
  9. Explain the difference between gRPC and REST in Node.js.
  10. How do you implement GraphQL in Node.js?
  11. How do you design a scalable microservices architecture with Node.js?
  12. What are the security best practices for Node.js applications?
  13. How do you implement OAuth2.0 in Node.js?
  14. Explain horizontal vs vertical scaling in Node.js.
  15. What are worker threads vs child processes? When to use each?
  16. How do you manage large-scale logging in Node.js?
  17. What are some advanced debugging tools for Node.js?
  18. How do you implement distributed caching in Node.js?
  19. What is the difference between Redis pub/sub and Socket.IO in Node.js?
  20. Explain the concept of CQRS with Node.js.
  21. How do you implement event sourcing with Node.js?
  22. What is Deno and how does it compare to Node.js?
  23. How do you contribute to Node.js core?
  24. What are the latest features introduced in the recent Node.js versions?
  25. How do you handle millions of concurrent connections in Node.js?

Related Topics