Advanced Topic 38 of 51 Distributed Systems & Cloud
API Gateway
Single entry point routing and securing API traffic.
How it works
An API gateway is a single entry point for client requests to a set of backend services. It routes requests to the right service, aggregates responses and handles cross-cutting concerns such as authentication and authorization, rate limiting, TLS termination, request and response transformation, caching, logging, metrics and API versioning. Examples include Kong, NGINX, Envoy-based gateways, Amazon API Gateway and Apigee. The backend-for-frontend variant provides tailored gateways per client type.
Where it is used
Microservice back ends exposing public APIs, mobile applications needing aggregated responses and organizations that want consistent security and observability use gateways.
Common pitfall
The gateway can become a single point of failure and a bottleneck, and putting business logic in it creates a hidden monolith. Extra hops add latency. Misconfigured routing or authentication rules expose services. Keep it thin, deploy it redundantly and horizontally scaled, automate configuration through code and avoid coupling it to service internals.
Where it fits in the course
API Gateway is topic 38 of 51 in Distributed Systems & Cloud, rated Advanced. It follows Service Discovery. The next topic is Service Mesh.
Practice and explore
- Open the interactive lesson, with a mini quiz.
- Take the Distributed Systems & Cloud quiz.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the Distributed Systems & Cloud quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is API Gateway?
Where do people use API Gateway?
What is the most common mistake with API Gateway?
What should I learn before this topic?
How can I practice it?
Is API Gateway hard to learn?
How long does it take to learn API Gateway?
Which topics are related to API Gateway?
What should I study after API Gateway?
Related topics
- Service Discovery (Distributed Systems & Cloud)
- Service Mesh (Distributed Systems & Cloud)
- Apache Spark (Distributed Systems & Cloud)
- Docker (Distributed Systems & Cloud)