Traffic & IngressID: api-gateway

API gateway

Where it sits

  1. Client
  2. API gatewaythis block
  3. Services
  4. Database

Every request from outside comes to the gateway first. It checks who is asking, then passes the request to the right service.

What it is

One front door for every request from outside. It checks who is asking, applies limits, and passes the request to the right service.

Why use it

Services stay off the public internet. Login checks, limits and logging live in one place, not in every service.

When to use it
  • A system with many services behind one public address.
  • One place to check login tokens before a request reaches a service.
  • Sending a small share of traffic to a new version, by path or by header.
When not to use it
  • A single app on one server. The gateway adds a hop and a part to run, with nothing to route.
  • Calls between services inside a trusted network, where a direct call is enough.