Skip to content
EduVerse

API Gateway

Explained

Concept

A single entry point for all API calls in a microservices architecture, handling routing, auth and rate limiting.

API Gateway, explained

Written by EduVerse

What it is

An API gateway is a server that sits in front of your backend services and receives every request from the outside world first. It decides which service should handle each request and forwards it there, so clients talk to one address instead of to a whole collection of separate services.

Why teams use it

Without a gateway, every service has to check tokens, slow down abusive traffic and log requests on its own, and clients need to know where each service lives. A gateway does those shared jobs in one place. The cost is an extra network hop and a component that must stay up, because everything passes through it.

An example from work

The frontend calls https://api.example.com/orders/42, which is the gateway’s address, not the orders service itself. In the gateway configuration you find routes that send every path starting with /orders to the orders service and every path starting with /users to the user service. When your new endpoint returns a 404 from the gateway, a missing route is the first thing to check.

Our own explanation, not a quote from the book.

Where it fits

Traffic management and security for microservices

Coverage in the book

Explained

Explained and compared with alternatives, so you know where and why it’s used.

Appears in