arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.35509cs.DCcs.AIcs.SE
收藏

大规模企业AI流量管控:基于Envoy的策略驱动多厂商LLM网关的设计与运维

Governing Enterprise AI Traffic at Scale: Design and Operation of a Policy-Driven, Multi-Vendor LLM Gateway on Envoy

PayPal Inc.(PayPal公司)

Mithun Sasidharan, Srinivasan Manoharan, Rupesh Thakur, Abhinav TK, Ashwin Hegde, Anand Gautam

AI总结:

本文介绍基于Envoy的Cosmos LLM网关的设计与运维,解决多厂商LLM集成的管控问题,该网关服务超12000开发者,日处理2000亿令牌,可用性达99.999%,开销极低。

摘要:

大型组织同时使用多家厂商的大语言模型(LLM),各厂商拥有独立的API方言、凭证模型、流式协议和定价机制。直接集成会导致凭证分散、格式锁定、支出无上限及管控不一致等问题。本文介绍PayPal的Cosmos LLM网关的设计与生产运维,该网关是企业LLM流量的管控入口,基于Envoy构建,按延迟特性拆分工作:I/O密集型控制决策(认证、凭证代理、策略与预算评估)在进程外的外部处理服务中运行,而线格式转换、令牌计量和提示缓存整形则作为Rust WebAssembly过滤器在代理内运行,默认情况下流式响应体块无需等待进程外调用。模型、提供商和价格主要为验证数据而非代码。管控机制为通过Open Policy Agent评估的声明式策略,由控制平面管理,具备角色范围的创作、审批、试点、影子模式部署、使用通知和版本化策略包等功能。对于有需求的用例,数据防丢失层可在敏感内容传输至提供商前对其进行拦截、擦除或匿名化处理。支出范围是按模型使用计数器划分的视图,新预算适用于其窗口内已记录的支出,无需迁移。截至2026年9月,该网关服务超12000名开发者和数百个业务用例,每日处理约2000亿令牌,覆盖100多个模型,业务可用性达99.999%。在针对合成上游的核心请求路径基准测试中,该网关在2个4 vCPU实例、每秒超2200请求的情况下,中位数开销为4毫秒,p99开销为11毫秒。本文报告了其架构、策略模型、评估及经验教训。

英文摘要:

Large organizations consume large language models (LLMs) from several vendors at once, each with its own API dialect, credential model, streaming protocol and pricing. Integrated directly, this heterogeneity yields credential sprawl, format lock-in, unbounded spend and inconsistent governance. We present the design and production operation of the Cosmos LLM Gateway, the governed entry point for enterprise LLM traffic at PayPal. Built on Envoy, it splits work by latency profile: I/O-bound control decisions (authentication, credential brokering, policy and budget evaluation) run in an out-of-process external-processing service, while wire-format translation, token metering and prompt-cache shaping run in-proxy as a Rust WebAssembly filter, so that, by default, streamed response body chunks never wait on an out-of-process call. Models, providers and prices are largely validated data rather than code. Governance is declarative policy evaluated by Open Policy Agent and managed through a control plane with role-scoped authoring, approvals, pilots, shadow-mode rollout, usage notifications and versioned policy bundles. For use cases that require it, a data-loss-prevention layer can block, redact or pseudonymize detected sensitive content before it reaches a provider. Spend scopes are views over per-model usage counters, so a new budget applies to spend already recorded in its window without migration. As of September 2026, the gateway serves more than 12,000 developers and hundreds of business use cases, handling roughly 200 billion tokens per day across more than 100 models at 99.999% availability to business. In a benchmark of the core request path against a synthetic upstream, it adds a median of 4 ms and a p99 of 11 ms of overhead at more than 2,200 requests per second on two 4-vCPU instances. We report the architecture, policy model, evaluation and lessons learned.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑