API Gateway
ELI5 — The Vibe Check
An API Gateway is the front door for all your APIs. Instead of clients talking to dozens of microservices directly, they go through one gateway that routes requests to the right service. It also handles authentication, rate limiting, and logging all in one place.
Real Talk
An API Gateway is a server that acts as a single entry point for a collection of backend services. It handles cross-cutting concerns like authentication, authorization, rate limiting, request routing, load balancing, caching, SSL termination, and logging/monitoring.
Show Me The Code
# AWS API Gateway configuration example
# Routes:
# GET /users → Lambda: list-users
# POST /users → Lambda: create-user
# GET /users/{id} → Lambda: get-user
# Kong API Gateway routing
curl -X POST http://localhost:8001/services/user-service/routes \
-d 'paths[]=/api/users'
When You'll Hear This
"All requests go through the API Gateway before hitting the microservices." / "Configure rate limiting at the API Gateway level."
Related Terms
Authentication (AuthN)
Authentication is proving you are who you say you are.
Load Balancer
A load balancer is like a traffic cop for servers.
Rate Limit
A rate limit is the AI provider saying 'slow down, buddy.
Reverse Proxy
A reverse proxy sits in front of your servers and handles incoming traffic on their behalf.