intermediate
Backend fundamentals
Service request lifecycle, middleware, error handling, validation, logging, configuration, environment, and shutdown.
Backend fundamentals interviews assess whether you can operate a Node HTTP service as a system: request lifecycle, middleware composition, errors, validation, logging, configuration, environment, and graceful shutdown.
Subtopics: request lifecycle, middleware, error handling, validation, logging, configuration, environment variables, and graceful shutdown.
On interviews: walk a request from socket accept through parsing, auth, validation, handler, response, and cleanup; explain what happens on SIGTERM.
Common pitfalls: fat route handlers, unhandled promise rejections, secrets in logs, missing startup config validation, and hard kills without draining in-flight work.
The trade-off is balancing simplicity, performance, safety, and operability — name which axis you optimized and what cost you accepted.
Checklist:
- Keep cross-cutting concerns in ordered middleware.
- Map operational vs programmer errors to HTTP responses.
- Validate untrusted input at service boundaries.
- Load and validate config once at startup; plan shutdown.