arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2510.04516cs.NI
收藏

重新思考HTTP API速率限制:一种客户端方法

Rethinking HTTP API Rate Limiting: A Client-Side Approach

Washington University in St. Louis(华盛顿大学圣路易斯分校)

Behrooz Farkiani, Fan Liu, Patrick Crowley

AI总结:

针对共享配额下客户端重试效率低的问题,提出无需中央控制的自适应客户端限流算法ATB和AATB,通过推断系统拥塞调度重试,将HTTP 429错误减少高达97.3%。

摘要:

HTTP是现代互联网服务的基础,提供商通过实施配额来规范HTTP API流量,以实现可扩展性和可靠性。当请求超出配额时,客户端会被限流并必须重试。服务器端强制执行保护了服务。然而,当独立客户端的使用量计入共享配额时,仅靠服务器控制效率低下;客户端无法了解其他客户端的负载,导致其重试尝试可能失败。事实上,重试时机至关重要,因为每次尝试都会产生成本,且除非被接纳,否则不会带来任何收益。虽然集中式协调可以解决此问题,但实际限制导致广泛采用简单的客户端策略,如指数退避。正如我们所展示的,这些简单策略会导致过度重试和巨大成本。我们设计了无需中央控制、仅依赖最少反馈的自适应客户端机制。我们提出了两种算法:ATB(一种可通过服务工作者部署的离线方法)和AATB(利用聚合遥测数据增强重试行为)。两种算法均通过推断系统拥塞来调度重试。通过对包含多达100个客户端的真实追踪和合成数据集进行仿真,我们证明与指数退避相比,我们的算法将HTTP 429错误减少了高达97.3%,而完成时间的适度增加被错误的减少所抵消。

英文摘要:

HTTP underpins modern Internet services, and providers enforce quotas to regulate HTTP API traffic for scalability and reliability. When requests exceed quotas, clients are throttled and must retry. Server-side enforcement protects the service. However, when independent clients' usage counts toward a shared quota, server-only controls are inefficient; clients lack visibility into others' load, causing their retry attempts to potentially fail. Indeed, retry timing is important since each attempt incurs costs and yields no benefit unless admitted. While centralized coordination could address this, practical limitations have led to widespread adoption of simple client-side strategies like exponential backoff. As we show, these simple strategies cause excessive retries and significant costs. We design adaptive client-side mechanisms requiring no central control, relying only on minimal feedback. We present two algorithms: ATB, an offline method deployable via service workers, and AATB, which enhances retry behavior using aggregated telemetry data. Both algorithms infer system congestion to schedule retries. Through emulations with real-world traces and synthetic datasets with up to 100 clients, we demonstrate that our algorithms reduce HTTP 429 errors by up to 97.3% compared to exponential backoff, while the modest increase in completion time is outweighed by the reduction in errors.

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

↑