DefendOn your resume
Enterprise LLM Gateway
Your strongest system-design story. Steer conversations here whenever you can.
Architected an OpenAI-compatible, multi-tenant LLM gateway with API-key authentication, token-aware RPM and TPM rate limits, semantic routing, context-window protection, provider abstraction, and resilient fallback.
Cross-questions
A strong answer covers
- Closed → open when errors cross a threshold in a window → half-open after a cooldown to probe → closed again on success.
- Kept per provider and model, and combined with a fallback chain.
Avoid
Confusing circuit breaking with retries.
A strong answer covers
- Stateless pods behind a load balancer, autoscaled on concurrency.
- Redis Cluster for counters; local token buckets synced periodically to cut Redis round trips.
- Long-lived streaming connections, regional quotas, and metric cardinality kept under control.
Avoid
One Redis instance and “add more pods.”
A strong answer covers
- Proxy server-sent events chunk by chunk, and read the usage block in the final chunk (stream_options include_usage) or count with a tokenizer.
- Cancel the upstream call when the client disconnects.
Avoid
Buffering the whole response before sending it.
Your numbers
Interviewers probe numbers first. Write exact values so you never have to improvise.