API Gateway — single entry point for all API calls.
When to use:
Responsibilities:
API Gateway:
- Request routing
- Authentication/Authorization
- Rate limiting
- Request/Response transformation
- Load balancing
- Caching
- Logging and monitoring
Examples:
Clients → [API Gateway] → [User Service]
→ [Order Service]
→ [Payment Service]
(Single entry point)
Benefits: Simplified client, centralized security, cross-cutting concerns.