Skip to content
BENIBIX Learn

API Gateway

Development🏗️ ArchitectureDistributed Systems

Also known as Gateway, Edge Service, Backend for Frontend

One front door that sends each request to the right service.

Think of it like

Think of it like the front desk of a big office. Visitors check in once, then get sent to the right room.

Example

Jack's phone app calls one address for all it needs. The gateway checks the login token. Then it sends order calls to the order service and profile calls to the user service.

Why it matters

It keeps shared jobs like logins and limits in one place. You do not copy them into each service.

Definition

An API gateway is a single front door that sits in front of many back-end services. Every request from an app goes to the gateway first. It checks who is calling, applies rate limits, and then sends the request on to the right service. It can also combine answers from several services into one reply. Clients only need to know one address.

Common mistake

Putting business rules in the gateway. It grows into a new monolith that each team must change.

Key takeaways

  1. 1
    One front door. For many services.
  2. 2
    Shared jobs here. Logins and limits.
  3. 3
    Route, do not decide. Rules stay in services.

Compare