System Design

Inside an API Gateway: Auth, Limits, and Routing

System Design diagram · made in Skemio

API gateway architectural flow showing TLS termination, JWT validation via cached JWKS, rate limiting with Redis, and upstream routing to microservices.
API gateway architectural flow showing TLS termination, JWT validation via cached JWKS, rate limiting with Redis, and upstream routing to microservices.

What it shows

  • Terminate TLS and verify JWT signatures locally using cached JWKS.
  • Redis token bucket algorithms enforce rate limits in under 2ms.
  • Reverse proxy forwards sanitized requests via internal service discovery.

The takeaway

Stop malicious traffic at the edge before it touches your internal microservices.

More system design diagrams