Interview Q&A · questions with model answers
Web Framework Internals Interview Questions
Part of the study plan for: Backend Engineer
Ordered by how often they're asked. Most-asked answers are free to read in full; members see every answer and can rate their confidence on each.
-
Most asked What is a request lifecycle, and why should a backend engineer know it for their framework?
The request lifecycle is the ordered sequence of steps a framework runs for each HTTP request: server hand-off, bootstrap, middleware or filters, routing, authentication and validation, the…
-
Most asked What layers does a request pass through before reaching application code, and how should their timeouts relate?
Typically client → CDN or load balancer → reverse proxy or web server (nginx, Apache) → application server (PHP-FPM, Gunicorn/Uvicorn, Node.js, Tomcat) → framework pipeline → your code and its…
-
Most asked What is the NestJS request lifecycle?
Middleware → guards → interceptors (before) → pipes → controller handler (and services) → interceptors (after) → response; exception filters handle errors thrown at any stage. Within each kind,…
-
Most asked What is the middleware 'onion' model?
Each middleware wraps the rest of the pipeline: it runs code on the way in, calls the next layer, then runs code on the way out with the response. Request-phase code runs in registration order and…
-
What state can leak between requests under Laravel Octane, and how do you prevent it?
Anything that lives longer than a request: singletons that captured the request, user, tenant or config; static properties; module-level caches. Prevent it with scoped bindings (flushed between…
-
What runs after the response is sent, and what is it good for?
Many frameworks support post-response work: Laravel terminable middleware and terminating callbacks, Symfony's kernel.terminate, Starlette/FastAPI background tasks, Django's request_finished signal,…