1. Junior

    How does the built-in HTTP server (node:http) work, and what is the lifecycle of IncomingMessage and ServerResponse objects?

    node:http uses an event-driven server. req represents a Readable stream for request data, and res is a Writable stream for sending response headers and the body.

    Read the full explanation
  2. Junior

    How do Express Middlewares work, and how does Regular Middleware differ from Error-Handling Middleware?

    Middlewares run in sequence through calls to next(); Error Middleware takes four arguments (err, req, res, next) and runs only when an error is passed to next(err).

    Read the full explanation
  3. Senior

    Why can Fastify outperform traditional frameworks, and how does Schema-Based Compilation work?

    Fastify precompiles schemas (JSON Schema) with fast-json-stringify and the find-my-way router, avoiding dynamic processing costs and speeding up serialization.

    Read the full explanation
  4. Mid-level

    How does NestJS apply Dependency Injection and organize Modules?

    NestJS uses an IoC Container and Decorators (@Injectable, @Module) to inject services and manage their lifecycles automatically through Constructor Injection.

    Read the full explanation
  5. Junior

    Why is input validation with schema libraries such as Zod important in Node.js?

    It ensures that client data matches expected types and constraints before it reaches business logic, and helps prevent injection attacks and field tampering.

    Read the full explanation
  6. Mid-level

    What is Content Negotiation, and how do you handle the Accept and Content-Type headers?

    It lets the client specify a preferred data format (such as JSON or XML) through Accept, while Content-Type declares the format of the data actually being sent.

    Read the full explanation
  7. Senior

    How do you build an efficient WebSocket server with the ws library and implement a Heartbeat (Ping/Pong)?

    An HTTP connection is upgraded to a bidirectional socket, and periodic Ping messages check that the connection is alive and close dead sockets (Zombie Connections).

    Read the full explanation
  8. Mid-level

    How do you safely handle multipart/form-data requests and file uploads in Node.js servers?

    Use a streaming parser (such as busboy or multer) to inspect boundaries and stream file parts while enforcing strict limits on file size and extension.

    Read the full explanation
  9. Senior

    How do you protect a Node.js server from Slowloris attacks and implement request rate limiting (Rate Limiting)?

    Protect against Slowloris by setting strict header timeouts (headersTimeout), and apply Rate Limiting with a Token Bucket algorithm and a shared Redis store.

    Read the full explanation
  10. Mid-level

    When should you prefer Server-Sent Events (SSE) over WebSockets, and how do you implement SSE in Node.js?

    Prefer SSE when data flows in one direction from the server to the client (such as notifications or streaming AI text), and implement it over an HTTP connection with the text/event-stream header.

    Read the full explanation