API Gateway

Noun · Development

Definitions

  1. API Gateway is a server that acts as the single entry point for all client requests to a backend system composed of multiple microservices. Instead of clients communicating directly with dozens of individual services, the API gateway handles routing, composition, protocol translation, authentication, rate limiting, request/response transformation, and load balancing in one place. When a client makes a request, the gateway determines which backend service(s) should handle it, forwards the request, and may aggregate responses from multiple services before returning a single response to the client. Popular API gateway implementations include Kong, Amazon API Gateway, Apigee (Google), and nginx-based solutions. API gateways also provide cross-cutting concerns like logging, monitoring, caching, and circuit breaking without requiring each microservice to implement them independently. The pattern simplifies client-side code and allows backend services to evolve independently. However, the gateway can become a single point of failure and a performance bottleneck if not properly scaled and managed.

    In plain English: A single front door for a bunch of backend services — instead of talking to ten different servers, your app talks to one gateway that routes each request to the right place and handles security along the way.

  2. In cloud architecture, an API gateway also handles cross-cutting concerns like logging, metrics, request transformation, and caching — functionality that would otherwise be duplicated across every microservice. AWS API Gateway, Kong, and Envoy are popular implementations.

    Example: 'Moving rate limiting to the API gateway eliminated 2,000 lines of duplicated middleware across our 15 microservices.'

    Source: architectural detail

Etymology

2000s
Service-oriented architectures introduced the need for a centralized entry point to route and manage requests across multiple backend services.
2012
Apigee, Mashery, and other early API management platforms formalized the 'API gateway' pattern, providing authentication, rate limiting, and analytics at the network edge.
2015
AWS launched API Gateway as a managed service, making the pattern accessible without infrastructure management. Kong, an open-source gateway built on Nginx, also launched.
2018-Present
API gateways became a standard component in microservice and serverless architectures. Envoy-based gateways, GraphQL gateways, and service meshes extended the concept further.

Origin Story

The Single Door That Guards a Thousand Services

An API gateway is a server that acts as the single entry point for a set of microservices, handling request routing, authentication, rate limiting, and other cross-cutting concerns. The pattern emerged in the early 2010s as companies migrated from monolithic architectures to microservices, creating a need for a unified interface that clients could interact with instead of communicating with dozens of individual services directly. Netflix was one of the earliest and most influential adopters, building its Zuul gateway (open-sourced in 2013) to manage traffic across hundreds of microservices. The pattern drew inspiration from the Facade design pattern in object-oriented programming and from traditional reverse proxies like nginx, but added application-level intelligence. API gateways handle concerns that would otherwise need to be duplicated across every service: authentication, SSL termination, request/response transformation, logging, and circuit breaking. AWS launched API Gateway as a managed service in 2015, making the pattern accessible to smaller teams. Kong (built on nginx, released 2015) and Traefik (2015) emerged as popular open-source options. Today, API gateways are considered a fundamental component of microservice architectures, often integrated with service meshes for internal traffic management.

Context: Emerged in the early 2010s as microservice architectures needed a single entry point; Netflix's Zuul (2013) was an early leader.

Fun fact: Netflix's Zuul gateway handles billions of requests per day and has served as the testbed for chaos engineering experiments, including the famous Chaos Monkey tool that randomly kills production instances to test resilience.

Related Terms