What is API Gateway
Single entry point for API requests
API Gateway
API Gateway is a server that acts as a single entry point for all client requests to microservices, performing routing, aggregation, and cross-cutting functions.
Core Functions
| Function | Description | |----------|-------------| | Routing | Directing requests to appropriate services | | Authentication | Token and API key validation | | Rate Limiting | Request frequency throttling | | Caching | Storing frequent responses | | SSL Termination | HTTPS handling at entry | | Logging | Centralized log collection |
Popular Solutions
- Kong — open-source API Gateway on Nginx
- AWS API Gateway — cloud serverless
- Apigee — enterprise from Google
- Traefik — cloud-native reverse proxy
- NGINX Plus — extended NGINX
Patterns
- BFF (Backend for Frontend) — separate gateway for each client type
- Gateway Aggregation — combining responses from multiple services
- Gateway Offloading — moving common logic from services
Benefits
- Simplified client code
- Centralized security
- Flexible routing
- Monitoring and analytics in one place