Mock Interviewer

Ask Coach

Ask Coach
Clarify requirements before you design — kept separate from your stage notes.

Tap a question to start, or type your own below.

API Gateway System Design

Visual Problem Diagram

API Gateway System Design architecture diagram

Scenario

A misconfigured route sends payment traffic through the debug plugin and every checkout times out at p99 8 s—meanwhile one OAuth client hammers a single shard because rate limits lived in app code, not the edge. The gateway interview is routing, auth, rate limits, and observability on the shared front door.

Design an API gateway that sits in front of microservices and handles routing, authentication, rate limiting, SSL termination, and optional request aggregation. It is the shared failure domain for misconfigurations and overload—design for HA, low added latency, and clear HTTP contracts.

You should support dynamic routing, JWT/API-key auth, per-client rate limits, logging/metrics, and circuit breaking to backends. Be ready to compare with load balancers, explain distributed rate limiting, and how config changes roll out safely.

Constraints

Functional

Route by path/host/header, JWT and API key auth, rate limiting, SSL termination, request/response transform, metrics

Non-functional

< 5 ms added p99, 99.99% availability, zero-downtime config, handle 100K+ RPS per region

Scale

10K+ routes, 100K RPS peak, thousands of tenants/API keys, global multi-region

Stages ahead

1Requirement Analysis
2API Design
3High-Level Design
4HLD Extensions
5Trade-offs

Log in to start practicing

Preview the problem below. Sign in to start your timed session, save progress, and use the AI coach.