System Design
3. Client-Server ArchitectureAnimated
API Gateway Pattern
A single entry point that routes, secures and shapes API traffic.
The idea
The gateway handles authentication, rate limiting, routing and aggregation so each service need not.
Watch it work
Press play, pause, or step through. Some animations have settings you can change.
- client
- gateway / proxy
- service
- cache
- data store
- queue / stream
Every client request enters through the gateway.
- step:
- 1/4
- at:
- Client
1/9
The green dot is a request moving through the system.
Step by step
- 1Client calls the gateway
- 2Gateway authenticates and limits
- 3It routes to the right service
- 4Response returns through the gateway
Where it is used
Microservice front doors.
Watch out for
The gateway can become a bottleneck and a SPOF.