One Gateway, Thousands of Tenants: Scaling Envoy AI Gateway
summary
A production account of running a multi‑tenant AI gateway on Envoy that turns per‑tenant config into request metadata and avoids a config explosion: uses Envoy/Envoy Gateway (agent router) changes — merge backend to collapse thousands of identical clusters, limit from metadata to apply per‑tenant rate limits at request time, credential override to supply per‑tenant provider keys, and priority groups for dynamic fallback ordering. Cluster count drops from ~27,000 to ~40 and heap use falls from ~32 GB to a few hundred MB, keeping thousands of tenants viable.
AI-written summary · about
chapters (13)
- 0:00Introduction and speaker background
- 1:04Problem with virtual keys as gateways
- 2:48Why choose Envoy for AI gateway
- 4:10Config growth explosion with thousands of tenants
- 9:26Why the configuration breaks Envoy
- 10:52Key as data not configuration
- 13:00Merge backend feature to reduce clusters
- 14:03Dynamic rate limiting from metadata
- 15:10Credential injection for per-tenant keys
- 16:13Priority groups for fallback chains
- 18:41Before and after scaling results
- 19:44Lessons learned and future improvements
- 21:26Q&A session
