advanced
Proxies and gateways
Compare forward proxies, reverse proxies, load balancers, and API gateways by traffic direction, responsibility, and failure behavior.
Proxy and gateway interviews compare forward vs reverse proxies, load balancers, and API gateways by traffic direction, TLS termination, health checks, and failure behavior.
Subtopics: forward and reverse proxies, load balancers, and API gateway at the network edge.
On interviews: place components in a diagram from client to service, explain X-Forwarded-* trust, and describe what happens when an upstream is unhealthy.
Common pitfalls: trusting client IP headers from the open internet, sticky sessions without understanding state, and gateways that become a distributed monolith of business logic.
The trade-off is balancing simplicity, performance, safety, and operability — name which axis you optimized and what cost you accepted.
Checklist:
- Know which hop terminates TLS and validates identity.
- Configure health checks, draining, and failover.
- Keep domain logic in services; gateways for cross-cutting policy.
- Document blast radius when the gateway misroutes.