Single entry point for services
Day 118 of 149
👉 Full deep-dive with code examples
The Hotel Concierge Analogy
At a hotel, you don't go directly to housekeeping, the kitchen, or maintenance:
- You talk to the concierge
- They route your request to the right department
- They handle translations and special requests
An API Gateway is the concierge for your APIs!
All requests go through one door, then get routed appropriately.
The Problem It Solves
With many microservices:
- Client needs to know all service addresses
- Each service implements its own auth, rate limiting
- Mobile clients make many requests to different services
- Hard to make changes without breaking clients
What an API Gateway Does
Single entry point:
Client → API Gateway → Service A
→ Service B
→ Service C
Handles cross-cutting concerns:
- Authentication → Verify user identity
- Rate limiting → Prevent abuse
- Caching → Speed up responses
- Logging → Track all requests
- Routing → Send to right service
The Benefits
- Simplified clients → One address, not many
- Security centralized → Auth in one place
- Flexible backend → Change services without changing clients
- Aggregation → Combine multiple service calls into one
Common Features
- Route requests based on URL path
- Transform requests/responses
- Load balance across instances
- Handle SSL/TLS termination
- Provide API versioning
Popular API Gateways
- Kong → Open source, plugins
- AWS API Gateway → Cloud managed
- NGINX → Web server + gateway
- Apigee → Enterprise, by Google
In One Sentence
An API Gateway provides a single, unified entry point for all API requests, handling security, routing, and common concerns in one place.
🔗 Enjoying these? Follow for daily ELI5 explanations!
Making complex tech concepts simple, one day at a time.
Top comments (0)