Animation10 min

Proxies, Reverse Proxies & API Gateways

The front door: TLS, auth, rate limits, and routing in one place.

A forward proxy sits in front of clients and hides them from servers. A reverse proxy sits in front of your servers — it terminates TLS (the encryption handshake), compresses responses, and shields the backend. An API gateway is a reverse proxy with application smarts added: it authenticates requests, enforces rate limits, and routes each request to the right backend service. In most interview diagrams, the gateway is the second box after the load balancer.

The animation shows why one front door is valuable. Every request passes three stamping stations in sequence — TLS, auth, rate limit — before being routed down a colored pipe to the correct microservice. Watch the unauthenticated request get bounced at the second stamp: it never touches a backend server, so backend code never has to re-check identity itself.

That is the core idea: do the cross-cutting work once, at the edge, instead of duplicating it in every service behind it.

Carry this into interviews: at mid-level, nothing you draw is taken for granted. If you put an API gateway on the whiteboard, expect "what does it do and why do we need it?" — and after this animation, you can answer with the three stamps.