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