Uber 的限流系统

Uber’s service-oriented architecture processes hundreds of millions of RPCs (remote procedure calls) per second across thousands of services. Keeping this system reliable requires strong overload protection, ensuring that no single caller, client, or service can overwhelm another.

Uber 的面向服务架构每秒处理数亿 RPCs(远程过程调用),跨越数千个服务。保持此系统可靠需要强大的过载保护,确保没有单个调用者、客户端或服务可以压垮另一个。

To achieve this, we set out to design a rate-limiting service that would make it easy for services to configure limits per caller or per procedure, without code changes. This service, later known as the GRL (Global Rate Limiter), integrates directly into the service mesh, which relays RPC requests for most of Uber’s services.

为了实现这一点,我们着手设计一个限流服务,使服务能够轻松为每个调用者或每个过程配置限值,而无需代码更改。此服务后来被称为 GRL (Global Rate Limiter),它直接集成到服务网格中,该网格为 Uber 大多数服务中继 RPC 请求。

Over time, that foundation evolved into a fully automated control system powered by the RLC (Rate Limit Configurator), which keeps limits fresh and accurate based on historical world traffic patterns.

随着时间的推移,这个基础演变为一个完全自动化的控制系统,由 RLC (Rate Limit Configurator) 提供支持,它基于历史全球流量模式保持限值新鲜和准确。

Together, these systems ensure that Uber’s platform remains resilient, even as it processes hundreds of millions of requests per second across thousands of microservices.

这些系统共同确保 Uber’s 平台保持弹性,即使它每秒处理数亿个请求,跨越数千个微服务。

In distributed systems, rate limiting is a foundational mechanism for maintaining reliability and fairness. It protects shared services from overload, prevents cascading failures, and ensures that no single caller can consume disproportionate capacity.

在分布式系统中,限流是维护可靠性和公平性的基础机制。它保护共享服务免于过载,防止级联故障,并确保没有单个调用者消耗不成比例的容量。

The most common distributed design uses a distributed counter store, often implemented with Redis®. Each request increments a key representing a caller or endpoint, and the system rejects requests once the counter exceeds a configured threshold. For many applications, this approach provides a simple, effective balance between accuracy and cost.

最常见的设计使用分布式 counter store,通常用 Redis® 实现。每个请求递增一个代表 caller 或 en...

开通本站会员,查看完整译文。

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.153.0. UTC+08:00, 2026-02-13 03:10
浙ICP备14020137号-1 $お客様$