Skip to solution
mediumSystem Design

What is an API gateway?

818 views
01

Understand the problem

Explain the API gateway pattern.

api-gateway
02

Attempt it yourself

Sketch your approach before reading the solution — that's what interviews test.

Nudge consolestandby

Stuck? Beam a request up — the console returns a conceptual nudge that guides your logic without spoiling the implementation.

03

Study the solution

What Is an API Gateway? (Beginner-Friendly Guide)

Target Audience: Junior & Senior Software Engineers preparing for System Design Interviews — no prior system design knowledge assumed. Difficulty: Easy to Medium

How to read this doc: Every concept is explained in plain language first. Right after, you

Solution ready — 2 min read

Classified // press E to declassify

04

Read the code

Gateway routing table (concept)
Run Playground
// Match path -> upstream service. Cross-cutting policy applied centrally.
const routes = [
  { prefix: "/auth",   upstream: "http://auth-svc:8080" },
  { prefix: "/orders", upstream: "http://orders-svc:8080", auth: true, rateLimit: "100/min" },
  { prefix: "/users",  upstream: "http://users-svc:8080", auth: true },
];

// Every request flows through the same pipeline:
//   tls -> authenticate -> rateLimit -> route(prefix) -> proxy(upstream)
05

Join the discussion

Discussion (0)

Sign in to join the discussion.

No responses yet. Be the first to share what you think.

Transmission complete // awaiting log

KEEP THE
STREAK ALIVE.

Dossier 17 of 99 decoded in the System Design track. One more won't hurt.

Back to track