API gateways and management
An API gateway is a runtime component that sits in front of your APIs and handles concerns every API shares: authentication, authorization, rate limiting, routing, request transformation and logging. API management is the wider practice and tooling around it: designing and publishing APIs, a catalog and developer portal, versioning and retirement, and analytics on who uses what.
The gateway enforces policy on every call; management makes APIs findable, consistent and governable as products. See also API gateway in the glossary.
Diagram
Section titled “Diagram”- Clients call the gateway with credentials such as a token or API key.
- The gateway authenticates, applies rate limits and policies, and routes to the right backend.
- Policies and API versions are defined in the management plane and pushed to the gateway.
- The developer portal publishes the catalog and documentation, and issues credentials.
What a gateway does
Section titled “What a gateway does”| Concern | Examples |
|---|---|
| Security | Validate OAuth 2.0 tokens or API keys, enforce scopes, mutual TLS, block known-bad traffic |
| Traffic control | Rate limits and quotas per client, spike arrest, request size limits |
| Routing | Path and version routing, canary routing, routing to different backends |
| Transformation | Header and payload changes, protocol translation (for example REST to SOAP) |
| Observability | Access logs, metrics per API and client, correlation IDs |
| Resilience | Timeouts, retries, circuit breaking |
| Caching | Response caching for safe, repeatable requests |
What API management adds
Section titled “What API management adds”- Catalog and developer portal: one place to find every API, its documentation and its owner, and to request access.
- Lifecycle: design standards, review, publishing, versioning, deprecation and retirement.
- Products and plans: grouping APIs with quotas for different consumers, including monetized partner APIs.
- Analytics: who calls which API, how often, with what errors. This is how you know who to contact before retiring a version.
Kinds of gateway
Section titled “Kinds of gateway”- Edge gateway: for external clients and partners. Strong security and quotas.
- Internal gateway: for service-to-service traffic across teams or domains. Lighter policies, focused on identity and observability.
- Backend for frontend: a gateway-like service per client type, which shapes responses. This contains client-specific logic and is owned by the frontend team; don’t confuse it with the shared gateway.
- Service mesh: handles service-to-service security, routing and telemetry with sidecars or node proxies, often alongside an edge gateway.
- AI or model gateway: the same idea applied to model calls.
- Consistent security and limits across every API without each team reimplementing them.
- A single view of API usage.
- APIs become discoverable and reusable.
- An extra hop and a critical shared dependency; it must be highly available.
- A central gateway team can become a bottleneck if every route change needs a ticket.
- Business logic tends to creep into gateway policies, where it’s hard to test.
Common pitfalls
Section titled “Common pitfalls”- Business logic in the gateway: keep it to cross-cutting concerns.
- One gateway configuration owned by one team for hundreds of APIs. Let teams manage their own APIs’ configuration as code, within shared standards.
- Relying on the gateway for all authorization. It can check that a token is valid and has a scope; only the service knows whether this user may see this record.
- No owner per API in the catalog, so the catalog becomes a list of orphans.
Related patterns
Section titled “Related patterns”Written and edited by Abhinav Taduka, enterprise software architect.
New pages are added regularly. Follow Abhinav on LinkedIn to see them first.