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 Where should authentication, authorisation, validation and error formatting live in a web framework?
Authentication in the pipeline layer that runs for every request (middleware, firewall, guard, filter, dependency); coarse authorisation in route-level middleware, guards or dependencies with…
-
Most asked Walk through the Laravel request lifecycle and say where you would add code that must run on every request.
public/index.php loads the autoloader and app; the HTTP kernel bootstraps (environment, configuration, error handling, facades) and registers then boots all service providers; global middleware…
-
Most asked Walk through the Django request lifecycle.
WSGI/ASGI handler builds HttpRequest → MIDDLEWARE in order (request phase) → URL resolver → process_view hooks → view → process_exception on errors or template response rendering → MIDDLEWARE in…
-
Most asked How does Express handle a request, and how are errors routed?
Middleware and route handlers run in registration order; each responds or calls next(). next(err) or a synchronous throw skips to error-handling middleware (functions with four parameters).…
-
Most asked Describe the Spring MVC request flow and where exceptions are handled.
Filter chain (including Spring Security) → DispatcherServlet → HandlerMapping → HandlerInterceptor.preHandle → argument resolution, message conversion and @Valid → controller → return value written…
-
Most asked Describe Symfony's HttpKernel lifecycle and how listener priorities affect it.
The kernel dispatches kernel.request (session, routing, locale, firewall and your listeners; any may set a response), kernel.controller and kernel.controller_arguments, runs the controller,…
-
Most asked Describe how FastAPI processes a request and where exceptions are handled.
ServerErrorMiddleware (outermost) → user middleware (last added runs first) → ExceptionMiddleware with your handlers → router → dependency resolution and Pydantic validation (422 on failure) →…
-
Most asked What happens in the browser from navigation to an interactive single-page app?
DNS, TLS and the HTML request; parsing HTML and downloading CSS and JavaScript; the framework renders the app (or hydrates server-rendered HTML); effects or mounted hooks run and often start data…
-
Walk through the Flask request lifecycle, including contexts and teardown.
WSGI call → push app and request contexts → URL matching → before_request (a returned value skips the view) → view → after_request in reverse registration order → session saved → response returned →…
-
What happens when a request hits a Next.js App Router app?
Config headers/redirects/rewrites → proxy (middleware.ts before Next.js 16) for matched paths → routing (static files served directly) → server components render on the server, or route…