Serving
LLM gateways
One internal endpoint for all models: routing, fallbacks, keys, budgets, caching and logs.
What it is and why it exists
A gateway sits between your services and model providers, normalising APIs and adding retries, fallbacks, load balancing across keys and regions, per-team budgets, caching, PII filters and central logging.
Quick prototype
Each service calls the provider SDK directly.
In production, at scale
A gateway (self-hosted or managed) with per-route policies, virtual keys per team, cost attribution, and observability export.
Vendors and tools
| LiteLLM | Open-source proxy with routing and budgets |
|---|---|
| Portkey / Helicone / Kong AI Gateway / Cloudflare AI Gateway | Managed gateways |
| OpenRouter | Hosted multi-provider routing |
On AWS: Bedrock as a multi-provider API; API Gateway + Lambda for a custom gateway; cross-region inference profiles.
How it fails
- The gateway becoming a single point of failure
- Extra latency from a far-away hosted gateway
What the interviewer asks next
Why put a gateway in front of models?
One place to enforce keys, budgets, fallbacks, caching and logging, so every service doesn’t reimplement them — and switching providers is a config change.