Skip to main content
← PROBLEMS / SYSTEM-DESIGN
An end-to-end domain learning journey

Design a 150k RPS Multi-Model AI
Router & Shadow Canary Gateway.

Design a multi-tenant AI gateway (OpenRouter / Portkey scale) sustaining 50k–150k RPS with <8 ms routing overhead, 480k concurrent SSE streams, isolated TPM/RPM key pools, and 5% async shadow canary evaluation.
Start the journey1 stages
FIRST PRINCIPLES. PRODUCTION SCALE.
The idea to keep with you

When scaling AI gateways, lease 50-request quota batches from Redis and tee 5% shadow traffic to Kafka.

TL;DR30-second simplified summary
▾

Little's Law predicts 480k open SSE streams; local batch leases cut Redis ops by 98%, and non-blocking ring buffers protect live pods from Kafka stalls.

01
SYSTEM-DESIGN · STAGE 01L4 · FUNDAMENTALS

Problem statement & core requirements.

Design a multi-tenant AI gateway (OpenRouter / Portkey scale) sustaining 50k–150k RPS with <8 ms routing overhead, 480k concurrent SSE streams, isolated TPM/RPM key pools, and 5% async shadow canary evaluation.

Recommended Learning Flow