Skip to content
StackDecode
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.

ClientAPI gatewayAuthOrdersCatalogData
  • 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

  1. 1Client calls the gateway
  2. 2Gateway authenticates and limits
  3. 3It routes to the right service
  4. 4Response returns through the gateway

Where it is used

Microservice front doors.

Watch out for

The gateway can become a bottleneck and a SPOF.

Related