Reverse proxy
Represents origin services to clients: terminate TLS, select virtual host, serve/cache content and forward trusted metadata.
APPLICATION DELIVERY · TRAFFIC CONTROL
A reverse proxy, load balancer and API gateway may occupy one product or several layers, but their responsibilities differ. Toggle health, latency and routing policy to derive 200, 502, 503 and 504 from evidence.
REQUEST ROUTING SIMULATOR
This simulation distinguishes connection failure, no healthy capacity and an upstream that exceeded the gateway deadline.
request-idX-Forwarded-*deadline1 · 2 · 3SEPARATE THE ROLES
Represents origin services to clients: terminate TLS, select virtual host, serve/cache content and forward trusted metadata.
Distributes work across eligible instances using health and a balancing policy.
Applies API policy: authentication, authorization, quota, transformation, routing, observability and deadlines.
FAILURE SEMANTICS
| Status | Evidence | Meaning | Retry question |
|---|---|---|---|
| 502 Bad Gateway | Connection refused, malformed upstream response | Gateway could not obtain a valid upstream response. | Is the operation idempotent? |
| 503 Service Unavailable | No healthy instances or capacity intentionally unavailable | Service cannot accept work now. | Honor Retry-After and use backoff. |
| 504 Gateway Timeout | Upstream exceeded gateway deadline | Outcome may be unknown; the upstream might still complete. | Could retry duplicate a side effect? |
HEADERS AND TRUST BOUNDARIES
Correlates logs across hops. Generate or validate it at a trusted boundary.
A chain of addresses; do not trust arbitrary client-supplied values.
Tells the origin whether the external request used HTTPS after TLS termination.
Preserves routing context but must be validated against allowed hosts.
CLASSROOM TASKS