Back to Catalog
Microservices
API Design
API Gateway
One front door for all clients — routes, transforms, and fans out requests to the right services.
Intent & Description
Real-world Use Case
Mobile app hits POST /checkout — the gateway authenticates the JWT, routes to Order Service, fans out to Inventory and Payment, then returns a unified response. Mobile team never knows there are 3 services involved.
Source
📌 TL;DR
API Gateway = the bouncer + receptionist for your microservices. One door in, smart routing out.
Advantages
- Clients talk to one URL, not 50 service endpoints
- Centralize cross-cutting concerns (auth, tracing, rate limits)
- Backend services can change/move without breaking clients
- Enables protocol translation (REST → gRPC, HTTP → WebSocket)
Disadvantages
- Gateway becomes a critical single point of failure — must be HA
- Risk of becoming a “gateway monolith” if business logic creeps in
- Extra network hop adds latency
- Needs its own deployment, scaling, and maintenance