Overview
The request lifecycle diagram traces an HTTP request as it flows through the API host middleware pipeline — from the global exception handler at the outermost layer, through correlation ID generation, authentication, delegation token processing, tenant resolution, request auditing, authorization, rate limiting, and finally to the endpoint handler.
Key takeaways
- ExceptionHandler wraps the entire pipeline — no unhandled exceptions leak to the client
- TenantResolutionMiddleware resolves the tenant before any business logic runs
- RateLimiter applies per-tenant token bucket policies to protect backend services
- Middleware executes in registration order; order matters for cross-cutting concerns
Related
- Mediator Pipeline — post-routing request processing
- Multi-tenancy deep dive — tenant resolution internals