IP Library Granted Patent US 12,204,933
Granted Patent B2
US 12,204,933 · App. 17/390,270 · Granted Jan 21, 2025

Asynchronous statistic-based rate limiting in distributed system

Inventors: Yoav Srebrnik (Seattle, WA); Brandon Farrell (Seattle, WA); Davin Bogan (Lafayette, CA)
Assignee: STRIPE, INC.
G06F9/485G06N20/00
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,204,933
App. No.
17/390,270
Granted
Jan 21, 2025
Kind
B2
Abstract

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.

Claims (40)

1. A method comprising:

at a client instance of a service:

establishing a rate limit for requests for the service received at the client instance;

tracking a number of requests for the service received at the client instance during a first time period, while enforcing the rate limit;

reporting the number of requests for the service received at the client instance during the first time period to a central store, wherein the central store is configured to receive and store reports from a plurality of client instances of the service connected to the service during the first time period;

making an asynchronous call to the central store for aggregated information regarding a total number of the plurality of client instances of the service connected to the service during the first time period and the number of requests for the service received at all of the plurality of client instances of the service during the first time period;

adjusting the rate limit based on the total number of the plurality of client instances of the service connected to the service during the first time period and the number of requests for the service received at all of the plurality of client instances of the service during the first time period; and

modifying the adjusted rate limit based on a prediction from a machine learned model,

wherein the machine learned model is trained using time of day information to predict a modification based on node type of a node running the service client instance, wherein the node type is a combination of the service and a type of machine running the node.

2. The method of claim 1 , wherein the establishing the rate limit includes dividing a capacity of the service by the total number of the plurality of client instances connected to the service.

3. The method of claim 1 , wherein the adjusting the rate limit includes subtracting a number of requests for the service received at all of the plurality of client instances of the service during the time period from a total capacity of the service, dividing the difference by the total number of the plurality of client instances of the service connected to the service during the first time period, and adding a result of the dividing to the number of requests for the service received at the client instance during the first time period.

4. The method of claim 1 , further comprising repeating the tracking, reporting, making, and adjusting for a second time period equal in length to the first time period.

5. The method of claim 1 , wherein the machine learned model is trained using time of day information to predict a modification based on current time of day.

6. A system comprising:

one or more processors; and

a memory storing instructions that, when executed by at least one processor among the one or more processors, cause the at least one processor execute a client instance of a service to perform operations comprising:

establishing a rate limit for requests for the service received at the client instance;

tracking a number of requests for the service received at the client instance during a first time period, while enforcing the rate limit;

reporting the number of requests for the service received at the client instance during the first time period to a central store, wherein the central store is configured to receive and store reports from a plurality of client instances of the service connected to the service during the first time period;

making an asynchronous call to the central store for aggregated information regarding a total number of the plurality of client instances of the service connected to the service during the first time period and the number of requests for the service received at all of the plurality of client instances of the service during the first time period;

adjusting the rate limit based on the total number of the plurality of client instances of the service connected to the service during the first time period and the number of requests for the service received at all of the plurality of client instances of the service during the first time period; and

modifying the adjusted rate limit based on a prediction from a machine learned model,

wherein the machine learned model is trained using time of day information to predict a modification based on node type of a node running the service client instance, wherein the node type is a combination of the service and a type of machine running the node.

7. The system of claim 6 , wherein the establishing the rate limit includes dividing a capacity of the service by the total number of the plurality of client instances connected to the service.

8. The system of claim 6 , wherein the adjusting the rate limit includes subtracting a number of requests for the service received at all of the plurality of client instances of the service during the time period from a total capacity of the service, dividing the difference by the total number of the plurality of client instances of the service connected to the service during the first time period, and adding a result of the dividing to the number of requests for the service received at the client instance during the first time period.

9. The system of claim 6 , wherein the instructions further comprise repeating the tracking, reporting, making, and adjusting for a second time period equal in length to the first time period.

10. The system of claim 6 , wherein the machine learned model is trained using time of day information to predict a modification based on current time of day.

11. A non-transitory machine-readable medium comprising instructions which, when read by a machine, cause the machine to perform operations comprising:

at a client instance of a service:

establishing a rate limit for requests for the service received at the client instance;

tracking a number of requests for the service received at the client instance during a first time period, while enforcing the rate limit;

reporting the number of requests for the service received at the client instance during the first time period to a central store, wherein the central store is configured to receive and store reports from a plurality of client instances of the service connected to the service during the first time period;

making an asynchronous call to the central store for aggregated information regarding a total number of the plurality of client instances of the service connected to the service during the first time period and the number of requests for the service received at all of the plurality of client instances of the service during the first time period;

adjusting the rate limit based on the total number of the plurality of client instances of the service connected to the service during the first time period and the number of requests for the service received at all of the plurality of client instances of the service during the first time period; and

modifying the adjusted rate limit based on a prediction from a machine learned model,

wherein the machine learned model is trained using time of day information to predict a modification based on node type of a node running the service client instance, wherein the node type is a combination of the service and a type of machine running the node.

12. The non-transitory machine-readable medium of claim 11 , wherein the establishing the rate limit includes dividing a capacity of the service by the total number of the plurality of client instances connected to the service.

13. The non-transitory machine-readable medium of claim 11 , wherein the adjusting the rate limit includes subtracting a number of requests for the service received at all of the plurality of client instances of the service during the time period from a total capacity of the service, dividing the difference by the total number of the plurality of client instances of the service connected to the service during the first time period, and adding a result of the dividing to the number of requests for the service received at the client instance during the first time period.

14. The non-transitory machine-readable medium of claim 11 , wherein the instructions further comprise repeating the tracking, reporting, making, and adjusting for a second time period equal in length to the first time period.

15. The non-transitory machine-readable medium of claim 11 , wherein the machine learned model is trained using time of day information to predict a modification based on current time of day.

Assignments (2)
CHANGE OF NAME Recorded Jan 7, 2026
From: STRIPE, INC.
To: STRIPE, LLC
Reel/Frame 074264/0807 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 30, 2021
From: SREBRNIK, YOAV; FARRELL, BRANDON; BOGAN, DAVIN
To: STRIPE, INC.
Reel/Frame 057038/0091 →
Continuity (1)
Related Publication 20230034770A1 · Feb 2, 2023
References Cited (20)
US 6339784B1 · Morris · 2002 [cited by examiner]
US 7764615B2 · Gilfix · 2010 [cited by examiner]
US 7908363B2 · Kothari · 2011 [cited by examiner]
US 8320240B2 · Kwan · 2012 [cited by examiner]
US 8819252B1 · Szeto · 2014 [cited by examiner]
US 9306994B2 · Gahm · 2016 [cited by examiner]
US 9374289B2 · Kotecha · 2016 [cited by examiner]
US 9497139B2 · Klein · 2016 [cited by examiner]
US 9521177B2 · Gahm · 2016 [cited by examiner]
US 10084800B2 · Bergman · 2018 [cited by examiner]
US 10191686B2 · Chrysanthakopoulos · 2019 [cited by examiner]
US 10554564B2 · Murphy · 2020 [cited by examiner]
US 10587524B2 · Byelov · 2020 [cited by examiner]
US 10951532B2 · Chen · 2021 [cited by examiner]
US 11824782B2 · Harp · 2023 [cited by examiner]
US 20090304020A1 · Bodin · 2009 [cited by examiner]
US 20180248807A1 · Murphy · 2018 [cited by examiner]
US 20180309686A1 · Roth · 2018 [cited by examiner]
US 20200028788A1 · Chen · 2020 [cited by examiner]
US 20210234890A1 · Bansal · 2021 [cited by examiner]