Basic Questions
What is Node.js, and how does it differ from JavaScript?
Explain the event loop in Node.js.
How does non-blocking I/O work in Node.js?
What is the purpose of package.json?
What is the difference between require and import?
What are streams in Node.js, and what are their types?
Explain the role of middleware in Node.js applications.
What are the differences between process.nextTick() and setImmediate()?
How do you handle uncaught exceptions in Node.js?
Explain the difference between fs.readFile and fs.createReadStream.
How would you secure a Node.js application?
What are some common reasons for memory leaks in a Node.js application?
How does clustering work in Node.js?
Advanced Questions
What is the difference between callback, promise, and async/await in Node.js?
Explain how Node.js handles concurrent requests with a single-threaded model.
What is the purpose of the worker_threads module?
How would you implement rate-limiting in a Node.js application?
Explain the concept of backpressure in Node.js streams and how you manage it.
What is the difference between fork() and spawn() in the child_process module?
What are some challenges in integrating Kafka with Node.js?
Practical Scenario Questions
How would you design a Node.js application to handle high concurrency?
How would you structure a project with multiple microservices using Node.js?
Write a simple middleware to log the duration of API requests.
How would you implement WebSocket communication in a Node.js application?
How do you manage dependencies in a Node.js project to avoid version conflicts?
Questions Specific to Tools and Libraries
How do you use Kafka with Node.js, and how would you optimize Kafka consumer performance?
Explain how Redis can be used in a Node.js application.
What are some best practices for using TypeScript in a Node.js project?
How do you integrate authentication in Node.js using JWT or OAuth?
What are the differences between Express and NestJS, and when would you use each?
Top comments (0)