API Gateway
NetworkingAn API gateway is a server that acts as a single entry point for a set of microservices, handling request routing, authentication, rate limiting, and protocol translation.
API gateways aggregate multiple backend services behind a single endpoint, simplifying the client-facing API surface. Instead of each client knowing about dozens of microservices, it interacts with one gateway that routes requests appropriately.
Key responsibilities include authentication and authorization (verifying tokens before forwarding requests), rate limiting (protecting backends from abuse), request/response transformation (e.g., aggregating data from multiple services), and protocol translation (REST to gRPC, HTTP to WebSocket).
In system design, API gateways are a natural companion to microservices architectures. They centralize cross-cutting concerns that would otherwise be duplicated across services. However, they can become a single point of failure if not properly scaled or made redundant.
Common implementations include Kong, AWS API Gateway, NGINX, and Envoy.
Related Terms
Ready to design?
Practice using api gateway in a real system design on Supaboard's interactive whiteboard.
Browse Challenges