Asynchronous Statistic-Based Rate Limiting for Uneven Distributed Loads

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing rate limiting methods in distributed systems suffer from network latency and inefficiencies, particularly when centralized solutions are used, and local rate limiters fail to adapt to uneven request distributions across instances.

Innovation Solution

Implementing local rate limiters that measure and aggregate throughput statistics asynchronously, allowing each instance to adjust its limits based on overall system capacity and instance-specific usage, without requiring real-time network communications.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a centralized rate limiter is used to manage requests across all instances, then service availability is protected from excessive use, but network bandwidth is consumed and performance is slowed due to required calls before each request

Engineering Contradiction:
Improveservice availabilityVSAvoidrequest latency
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The centralized rate limiter is segmented into distributed local rate limiters at each instance. Each instance independently tracks its own request count against its allocated capacity share, eliminating the need for network calls before each request while maintaining overall rate limiting effectiveness.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Each instance's local rate limiter serves itself by autonomously determining whether to allow or reject requests based on its locally stored capacity allocation and request count, without requiring external validation from a central authority for each individual request.

Inventive Principle:
Principle #25Self-service

2Productivity

If local rate limiters are assigned equal shares of overall capacity, then network calls are eliminated and performance improves, but the system cannot adapt when request distribution becomes uneven across instances

Engineering Contradiction:
Improverequest processing throughputVSAvoidadaptation to uneven load distribution
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

A feedback mechanism collects actual throughput statistics from each instance and reports them to a central coordinator. The coordinator recalculates capacity allocations based on observed usage patterns and distributes updated allocations to instances, enabling adaptation to uneven load distributions while maintaining high throughput.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The capacity allocation for each instance is made dynamic rather than static. Allocations are periodically adjusted based on observed throughput statistics and current system conditions, allowing the system to adapt to changing load distributions while instances continue to operate with local decision-making.

Inventive Principle:
Principle #15Dynamics

3Reliability

If a centralized cache of requests is used for rate limiting, then rate limits can be enforced across all instances, but network calls are required before each request which slows performance

Engineering Contradiction:
Improverate limit enforcementVSAvoidrequest processing speed
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The rate limiting function is extracted from the centralized cache and embedded locally at each instance. Each instance maintains its own request count and capacity allocation locally, eliminating the need for network calls to a centralized cache while preserving rate limit enforcement through local decision-making.

Inventive Principle:
Principle #2Taking out (Extraction)

4Device complexity

If local rate limiters enforce strict capacity limits, then resource allocation is controlled, but instances with lower actual usage are unnecessarily throttled when other instances generate more requests

Engineering Contradiction:
Improveresource allocation controlVSAvoidinstance request throughput
Core Design Contradiction:
Device complexityVSProductivity

Solution Approach 1:

Throughput statistics from all instances are collected and fed back to the capacity allocation system. When some instances have lower usage than their allocated capacity, the system detects this surplus and reallocates capacity to instances with higher demand, ensuring optimal utilization across the system while maintaining local control.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS20250217183A1Asynchronous statistic-based rate limiting in distributed system
Publication Date: 2025.07.03 STRIPE LLC
  • US20250217183A1 patent drawing
  • US20250217183A1 patent drawing
  • US20250217183A1 patent drawing

AI summary

In an example embodiment, rate limiting is performed at the instance level (i.e., locally), but utilizing throughput statistics of other instances. These statistics may be measured locally by each instance and then transmitted to a central store, where they are aggregated. Each instance is then able to asynchronously request the aggregated statistics from the central store and use this information to manage the parameters of its own local rate limiter.