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 shop sends a payment call through the shared front door, expecting the door to check the key and pass the call straight to the payment service. The painful failure is when every checkout waits about 8 seconds and then times out, because a bad route ran those calls through a debug step that was meant only for test traffic.

Stuck on where to start? Ask Coach

Clarify this problem here, or open Pathway Coach if you want a prep plan first.

Free Coach trial
How should I start prep?

A client sends a call to one shared front door. The door checks the caller's key. It sends the call to the right service. It can slow a caller who sends too many calls. It can ask two services and return one answer. The caller gets a single response.

You need to explain how the path or the host picks the service behind the door. You need to explain how the key is checked on each call. You need to explain how a caller's limit is shared across many copies of the door. You need to explain how a route change goes out without cutting off live calls. The code inside each backend service can stay thin.

Constraints

Functional

The door forwards a call by path, by host, or by header. It checks a key or a signed pass. It limits how often one caller can call. It ends public encryption at the edge. It can reshape a request or a response. It records timings and errors.

Non-functional

About 99 out of 100 calls spend under 5 milliseconds inside the door. The door stays up about 99.99% of the time. A route change does not drop calls that are already in flight.

Scale

More than 10,000 routes and thousands of callers with their own keys. Peak is about 100,000 requests a second in a region, and that request rate is what the door must absorb. The door runs in more than one region.

Stages ahead

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

Not ready to design yet?

Try the free Coach trial — ask how to prep, what to practice first, or how InterviewCrafted works. Sign in when you want to start this problem.

Try Coach free

Log in to start practicing

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

Want full access now? View Pro pricing