API Gateway Patterns Vocabulary
5 exercises — master API gateway vocabulary: gateway cross-cutting concerns, rate limiting algorithms, circuit breaker states, Backend for Frontend pattern, and north-south vs east-west traffic design.
0 / 5 completed
API gateway patterns vocabulary quick reference
- API gateway — single entry point; centralises auth, rate limiting, routing, TLS termination
- Rate limiting — capping requests per time window; HTTP 429 when exceeded
- Token bucket — rate limiting algorithm that allows controlled burst traffic
- Circuit breaker — fails fast when a service is unhealthy (closed → open → half-open)
- BFF — Backend for Frontend; a separate gateway per client type (mobile, web, partner)
- North-south traffic — external clients → cluster (gateway handles this)
- East-west traffic — service → service within the cluster (use service mesh, not the gateway)
1 / 5
What is an API gateway, and what responsibilities does it centralise that would otherwise be duplicated across every microservice?
The API gateway pattern solves the cross-cutting concerns problem in microservice architectures.
Without an API gateway — each microservice must handle:
• JWT validation: every service imports and runs token verification
• Rate limiting: every service has its own rate limiting logic and state
• CORS headers: every service configures allowed origins
• TLS termination: every service manages certificates
• Request logging: every service emits its own access logs
• API versioning: every service manages its own URL versioning
With an API gateway — centralised handling:
• Kong, AWS API Gateway, Azure API Management, Google Cloud Apigee
• NGINX, Traefik, Envoy (infrastructure-level proxies with gateway features)
• Apollo Router (GraphQL-specific gateway)
Key vocabulary:
• API gateway — the single entry point that routes requests and handles cross-cutting concerns
• Cross-cutting concerns — functionality needed by all services (auth, logging, rate limiting)
• TLS termination — ending the encrypted HTTPS connection at the gateway level; backend services use plain HTTP
• Reverse proxy — a proxy that forwards client requests to backend servers (the core of a gateway)
Without an API gateway — each microservice must handle:
• JWT validation: every service imports and runs token verification
• Rate limiting: every service has its own rate limiting logic and state
• CORS headers: every service configures allowed origins
• TLS termination: every service manages certificates
• Request logging: every service emits its own access logs
• API versioning: every service manages its own URL versioning
With an API gateway — centralised handling:
Client
↓
[API Gateway]
├── Auth check (JWT validation)
├── Rate limiting
├── Request transformation
├── TLS termination
└── Route to:
├── /orders/* → Orders service (HTTP)
├── /users/* → Users service (HTTP)
└── /products/* → Products service (gRPC, translated to HTTP)
Key API gateway products:• Kong, AWS API Gateway, Azure API Management, Google Cloud Apigee
• NGINX, Traefik, Envoy (infrastructure-level proxies with gateway features)
• Apollo Router (GraphQL-specific gateway)
Key vocabulary:
• API gateway — the single entry point that routes requests and handles cross-cutting concerns
• Cross-cutting concerns — functionality needed by all services (auth, logging, rate limiting)
• TLS termination — ending the encrypted HTTPS connection at the gateway level; backend services use plain HTTP
• Reverse proxy — a proxy that forwards client requests to backend servers (the core of a gateway)