Uber’s Rate Limiting System

Chien-Chih Liao, Rahul Gutal, Smit Sheth, Ying Jiang
14 min readadvanced
--
View Original

Overview

Uber’s Rate Limiting System details the evolution of Uber's approach to managing service overload through a unified rate-limiting architecture. The article discusses the transition from fragmented implementations to a Global Rate Limiter (GRL) and the introduction of the Rate Limit Configurator (RLC) for automated limit management.

What You'll Learn

1

How to implement a unified rate-limiting service in microservices architecture

2

Why probabilistic dropping improves traffic management during overloads

3

How to configure rate limits dynamically using historical traffic patterns

Prerequisites & Requirements

  • Understanding of microservices architecture and distributed systems
  • Familiarity with Redis and service mesh concepts(optional)

Key Questions Answered

What are the main challenges of fragmented rate limiting in microservices?
Fragmented rate limiting leads to inconsistent configurations, operational overhead, and uneven protection across services. Different implementations can create inefficiencies, making it difficult to manage and monitor traffic effectively, which can result in cascading failures during high load.
How does the Global Rate Limiter (GRL) improve service reliability?
The Global Rate Limiter (GRL) enhances service reliability by providing a unified approach to rate limiting, allowing configurations to be set per caller or procedure without code changes. This ensures that no single service can overwhelm others, maintaining system stability even under heavy traffic.
What role does the Rate Limit Configurator (RLC) play in Uber's rate limiting?
The Rate Limit Configurator (RLC) automates the process of updating rate limit configurations based on historical traffic patterns. It periodically analyzes live metrics and adjusts limits to ensure they remain relevant and effective, minimizing manual intervention.
What is the impact of using a control-plane-directed probabilistic dropping model?
The control-plane-directed probabilistic dropping model allows for more effective traffic management by enabling local proxies to make enforcement decisions based on aggregated load. This reduces latency and ensures that excess traffic is evenly distributed across all instances, improving overall system performance.

Key Statistics & Figures

Requests processed per second by GRL
80 million
At full scale, GRL processes around 80 million requests per second across more than 1,100 services.
Latency improvement for P99.5 requests
up to 90%
Requests that previously took several hundred milliseconds were reduced to tens of milliseconds.

Technologies & Tools

Some links below are affiliate links. We may earn a commission if you make a purchase.

Key Actionable Insights

1
Implementing a unified rate-limiting service can significantly enhance system reliability and performance.
By centralizing rate limiting, teams can avoid the pitfalls of fragmented implementations, ensuring consistent behavior across services and reducing operational complexity.
2
Utilizing probabilistic dropping can effectively manage traffic surges without overwhelming services.
This approach allows for a more equitable distribution of traffic load, preventing individual services from being overwhelmed while maintaining overall system responsiveness.
3
Automating rate limit configurations can save time and reduce errors in dynamic environments.
As traffic patterns change frequently, automated systems like the Rate Limit Configurator help ensure that limits are always aligned with current demand, minimizing the risk of service overload.

Common Pitfalls

1
Fragmented rate limiting implementations can lead to inconsistent service behavior and increased operational overhead.
When different teams implement their own rate limiting strategies, it creates a lack of standardization, making it difficult to manage and monitor traffic effectively.

Related Concepts

Microservices Architecture
Distributed Systems
Rate Limiting Strategies
Traffic Management Techniques