Skip to content
Glossary · System design

API gateway

Definition

A single entry point that sits in front of a system's APIs and handles routing, auth and limits for every request.

Last updated

What it is.

Clients such as a mobile app, a web app or a partner integration send every request to the gateway instead of calling each service directly. The gateway checks who is calling, applies rate limiting, routes the request to the right service and can reshape the response.

It is common in microservices setups, where it hides many internal services behind one public address. It is also used in front of a single back end, simply to keep auth, logging and limits in one place.

Why it matters

Without a gateway, every service has to repeat the same checks, and a mistake in any one of them is a hole. A gateway puts those cross-cutting rules in one place, so they are consistent and easy to change. It also gives one place to see all API traffic.

In a product build

We usually set up the gateway early, even with one back end, because adding it later means changing every client. Auth checks, request IDs, rate limits and access logs live there, and each service still checks permissions for its own data.

Watch out

Common mistakes.

  1. 01

    Putting business logic in the gateway. It becomes a second back end nobody owns.

  2. 02

    Trusting the gateway alone. Services should still check that the caller may touch the data they ask for.

  3. 03

    Making it a single point of failure with one instance and no health checks.

Related

Related terms.

Building something with this? Ask an engineer.

OceanLab designs and builds production software. Tell us what you are planning and we will reply with how we would approach it.

OceanLab

Enterprise Software Engineering - Human + AI

Languages

Locations

Global Headquarters

21 Merchant Road, 3rd Floor, Singapore 058267

Main corporate office and leadership operations

North America Office

548 Market Street, PMB 12472, San Francisco, CA 94104

Client operations and business development

India Office

402 Shivalik Shilp II, SG Highway, Ahmedabad 380015

Engineering and delivery center

© 2026 - Copyright. All Rights reserved OceanLab