← Concepts
Networking·3 min read

API Gateway

A single front door for many backend services that handles auth, rate-limiting, routing, observability in one place.

First time reading this? Start here

Plain English: one box that sits in front of your 50 microservices and handles the stuff every request needs (am I logged in? am I sending too fast? which service should this go to?). Lets the actual services stay simple.

Used in:URL ShortenerNetflixPayment Gateway
What it is

A reverse proxy that sits in front of your microservices and centralizes cross-cutting concerns: authentication, authorization, rate-limiting, request transformation, routing, logging. Clients talk to the gateway; the gateway talks to the actual services.

The problem it solves

In a microservices world, every backend would otherwise have to re-implement auth, rate-limiting, request logging, TLS termination, and CORS, and do it inconsistently. The gateway centralizes that boilerplate so services can focus on business logic.

How it works

Inbound requests hit the gateway. It validates the JWT/API key, checks the rate-limit counter, rewrites the URL if needed, attaches user context, then forwards to the right backend (often via service discovery). The response flows back through the gateway, which can do response transformations or logging on the way out.

Why use it
What it costs you
Where it shows up in our architectures
Gotchas

Your notes

Private to you