API Gateway Request Flow
An API gateway is a single entry point that sits in front of all your backend services, handling cross-cutting concerns — authentication, rate limiting, routing, request transformation, and observability — before passing the request to the appropriate upstream service.
An API gateway is a single entry point that sits in front of all your backend services, handling cross-cutting concerns — authentication, rate limiting, routing, request transformation, and observability — before passing the request to the appropriate upstream service.
What the diagram shows
This flowchart maps the decision tree that every inbound request traverses inside an API gateway:
1. Receive request: the gateway accepts the inbound HTTP request from the client. 2. Authenticate: the gateway validates credentials (API key, JWT, OAuth token). Invalid credentials result in an immediate 401 response. 3. Authorize: after identity is confirmed, the gateway checks whether the caller has permission for the requested resource (403 if not). 4. Rate limit: the gateway enforces per-client or per-route quotas. Exceeded quotas return 429 Too Many Requests. 5. Route: the gateway pattern-matches the request path against its routing table to identify the target upstream service. 6. Transform request: headers may be rewritten, payloads translated, or query parameters normalized before forwarding. 7. Proxy to service: the gateway forwards the request to the upstream microservice. 8. Transform response: the upstream response may be reshaped (e.g., envelope stripped) before returning to the client.
Why this matters
Without a gateway, each microservice must independently implement auth, rate limiting, and observability. This creates inconsistency and maintenance overhead. Centralizing these concerns in the gateway keeps services thin and focused on business logic.
For the downstream perspective, see Microservice Request Chain to understand what happens after the gateway forwards the request. Service Discovery Flow explains how the gateway resolves the upstream address dynamically. For traffic control specifics, explore Rate Limiting Architecture.