Curated real-world System Design interview questions spanning rate limiting for AI agents, end-to-end API idempotency, WhatsApp presence engine, Uber surge pricing, multi-region CRDT counters, prompt caching, 100TB sharding, and database decomposition.
Preview Mode Active · 5 Free Sample Questions
Review verified answers and code patterns below. The remaining 14 questions in this codex are unlocked with the Interview Pass or Full Access.
Traditional single-IP fixed-window rate limiters fail for AI agent workloads because autonomous agents generate rapid, multi-step, recursive execution loops that resemble volumetric attacks but are legitimate requests. A production rate limiter must differentiate human interactive users from AI agents, enforce both Request-Per-Minute (RPM) and Token-Per-Minute (TPM) limits, and implement adaptive backpressure to prevent cascading retry storms.
Key architectural pillars:
1. Dual-Dimension Quotas (RPM + TPM): Track both request count and LLM token velocity using Redis Sliding Window Logs or Token Bucket algorithms (CL.THROTTLE).
2. Granular Identity Fingerprinting: Rate limit by composite keys (Org ID + User ID + Agent ID + API Key) rather than raw IP addresses, isolating a rogue agent without impacting human users.
3. Runaway Loop Circuit Breakers: Automatically trip circuit breakers if an agent enters a runaway recursive loop (>50 calls/min on the same parent trace ID).
4. Standard Backpressure Contract: Return RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset, and Retry-After headers with randomized exponential backoff hints for autonomous runtimes.
You have reached the end of the 5 free preview questions. Get unrestricted lifetime access to all 19 questions, model solutions, architectural blueprints, and complete DSA codex.
One-time settlement · Lifetime access · Zero recurring bills