← Back to microservices patterns mapgateway
🌐
Microservices Pattern
API Gateway Pattern
A single entry point routes, authenticates, rate-limits, and protects backend services.
Detailed Description
Gateways are edge infrastructure. They protect internal services from client-specific routing, authentication, throttling, and protocol concerns.
Keep business logic out of the gateway so it does not become a second monolith.
Visual Diagram
Client -> API Gateway -> auth -> rate limit -> route to service
Tradeoffs
Pros
Centralizes cross-cutting concerns, hides topology
Cons
Can become bottleneck or single point of failure
Examples: Kong, AWS API Gateway, Nginx, Traefik