API gateways provide a single entry point for all clients:
Responsibilities:
- Request routing to backend services
- Authentication and authorization
- Rate limiting and throttling
- Request/response transformation
- Protocol translation (REST to gRPC)
- Monitoring and logging
Patterns:
- Simple gateway: Route and authenticate
- Backend for Frontend (BFF): Separate gateway per client type
- Gateway aggregation: Combine multiple service calls
Tools: Kong, AWS API Gateway, Apigee, Nginx
Gateways centralize cross-cutting concerns but can become bottlenecks.