Uber Details its Scalable Rate Limiting System

Uber's engineering team has disclosed the architecture of its rate limiting system for service-oriented backends. The design utilizes distributed tokens, multi-level throttling, and adaptive feedback loops. Such mechanisms are critical for ensuring API reliability and fairness for platforms that experience unpredictable traffic surges, like an insurtech API during a catastrophe event.

- Before developing a unified system, Uber's engineers implemented their own individual throttling logic, leading to a fragmented and unscalable approach to overload protection. The current system, known as GRL (Global Rate Limiter), is integrated directly into the service mesh, allowing it to inspect every request before it reaches its destination service. - The system utilizes a token bucket algorithm, a common method for handling bursts of traffic while maintaining a steady average rate. This approach is memory efficient and can accommodate sudden influxes of requests without violating the preset rate limits. Uber's open-source Go implementation, `go.uber.org/ratelimit`, is based on a leaky-bucket algorithm and is designed for simplicity and minimal overhead. - Uber's API gateway provides application-aware rate-limiting policies that can be more granular than simple user-level limits, allowing for enforcement based on specific fields from path/query parameters, headers, or the request body. This enables different limits for various tenants or service levels within a multi-tenant architecture. - For catastrophic events in insurtech, which can cause sudden traffic surges, strategies like auto-scaling, load balancing, and caching are essential for maintaining API reliability. Natural disaster APIs, for example, rely on being able to handle a high volume of requests for real-time data during emergencies. - The system's adaptive rate limiting adjusts limits based on real-time system performance and historical traffic patterns, a technique that is increasingly important for managing the unpredictable loads of AI and LLM-powered applications. This prevents any single user or service from monopolizing resources and causing cascading failures. - For Staff/Principal engineers, influencing without direct authority is a key skill, focusing on technical vision and expertise to guide teams rather than direct management. This involves setting technical direction, mentoring engineers, and aligning technical decisions with broader business goals. - Agentic AI architectures, which transform LLMs into autonomous agents, are structured around layers for tooling, reasoning, and action to handle complex, multi-step tasks. LLM orchestration frameworks like LangChain and LlamaIndex provide the structured workflows needed to manage these agents and connect them to data sources and APIs.

Get your own daily briefing

Scout delivers personalized news, insights, and conversations tailored to your role and industry.

Download on the App Store

Shared from Scout - Be the smartest in the room.