IP Library Granted Patent US 10,057,378
Granted Patent B2
US 10,057,378 · App. 14/618,719 · Granted Aug 21, 2018

Systems and methods for API rate limiting and distribution

Inventors: Qamal Kosim-Satyaputra (Kingsford, AU); Scott Lachlan Christopher (Oyster Bay, AU)
Assignee: BIGCOMMERCE PTY. LTD.
H04L67/42H04L67/02H04L67/1031H04L67/2842H04L67/2876
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 10,057,378
App. No.
14/618,719
Granted
Aug 21, 2018
Kind
B2
Abstract

An API rate limiting system may receive a client request from an API client associated with a tenant, formulate a proxied request with an internal authentication specific to the tenant, and send the proxied request to API endpoints (tenant resources) at a store. The store fulfills the request, accessing and modifying local database(s) as needed, and returns a response to the system. The system returns the response to the API client along with information about the API client's quota for the current time window. The system may calculate the quota based on a resource limit with respect to a number of clients accessing a resource. In some embodiments, the system may implement an exponential distribution function in making a determination on a quota per API client per time window.

Claims (124)

1. A method, comprising:

receiving, by an application programming interface (API) proxy system embodied on a cluster of server machines, a client request from an API client;

the API proxy system calculating a quota of requests allowed for the API client for a current time window based at least in part on a number of active API clients during the current time window and a tunable scaling factor, wherein the quota of requests allowed for the API client for the current time window is calculated using an exponential distribution function, wherein the exponential distribution function is formulated as:

S

×

(

1

-

e

-

λ

(

n

+

d

)

)

×

w

n

×

c

where S represents a resource limit per time frame, n represents the number of active API clients, w represents the current time window, λ represents the tunable scaling factor, d represents a multiplier, and C represents a configurable constant;

if the quota has been exceeded for the API client for the current time window, the API proxy system determining whether an exception is applicable;

if the quota has not been exceeded for the API client for the current time window, the API proxy system preparing a proxied request and forwarding the proxied request to one or more API endpoints referenced in the client request from the API client; and

adjusting a value of the current time window to change a volume per timeframe.

2. The method according to claim 1 , wherein C is 3600.

3. The method according to claim 1 , further comprising:

adjusting the tunable scaling factor to account for burst behavior of the API client; or

adjusting the value of the current time window and the tunable scaling factor.

4. The method according to claim 1 , further comprising:

tracking a number of client requests from the API client for the current time window; and

comparing the number of client requests from the API client for the current time window with the quota of requests allowed for the API client for the current time window.

5. The method according to claim 1 , further comprising:

tracking the number of active API clients, wherein tracking the number of active API clients comprises:

determining whether the API client is already connected; and

if the API client is not already connected:

marking the API client as connected; and

incrementing a counter tracking the number of active API clients.

6. An application programming interface (API) proxy system, comprising:

at least one processor;

non-transitory computer memory;

instructions embodied on the non-transitory computer memory and translatable by the at least one processor to perform:

receiving a client request from an API client;

calculating a quota of requests allowed for the API client for a current time window based at least in part on a number of active API clients during the current time window and a tunable scaling factor, wherein the quota of requests allowed for the API client for the current time window is calculated using an exponential distribution function, wherein the exponential distribution function is formulated as:

S

×

(

1

-

e

-

λ

(

n

+

d

)

)

×

w

n

×

c

where S represents a resource limit per time frame, n represents the number of active API clients, w represents the current time window, λ represents the tunable scaling factor, d represents a multiplier, and C represents a configurable constant;

if the quota has been exceeded for the API client for the current time window, determining whether an exception is applicable;

if the quota has not been exceeded for the API client for the current time window, preparing a proxied request and forwarding the proxied request to one or more API endpoints referenced in the client request from the API client; and

adjusting a value of the current time window to change a volume per timeframe.

7. The proxy system of claim 6 , wherein C is 3600.

8. The proxy system of claim 6 , wherein the instructions are further translatable by the at least one processor to perform:

adjusting the tunable scaling factor to account for burst behavior of the API client; or

adjusting the value of the current time window and the tunable scaling factor.

9. The proxy system of claim 6 , wherein the instructions are further translatable by the at least one processor to perform:

tracking a number of client requests from the API client for the current time window; and

comparing the number of client requests from the API client for the current time window with the quota of requests allowed for the API client for the current time window.

10. The proxy system of claim 6 , wherein the instructions are further translatable by the at least one processor to perform:

tracking the number of active API clients, wherein tracking the number of active API clients comprises:

determining whether the API client is already connected; and

if the API client is not already connected:

marking the API client as connected; and

incrementing a counter tracking the number of active API clients.

11. A computer program product comprising at least one non-transitory computer readable medium storing instructions translatable by at least one processor to perform:

receiving a client request from an API client;

calculating a quota of requests allowed for the API client for a current time window based at least in part on a number of active API clients during the current time window and a tunable scaling factor, wherein the quota of requests allowed for the API client for the current time window is calculated using an exponential distribution function, wherein the exponential distribution function is formulated as:

S

×

(

1

-

e

-

λ

(

n

+

d

)

)

×

w

n

×

c

where S represents a resource limit per time frame, n represents the number of active API clients, w represents the current time window, λ represents the tunable scaling factor, d represents a multiplier, and C represents a configurable constant;

if the quota has been exceeded for the API client for the current time window, determining whether an exception is applicable;

if the quota has not been exceeded for the API client for the current time window, preparing a proxied request and forwarding the proxied request to one or more API endpoints referenced in the client request from the API client; and

adjusting a value of the current time window to change a volume per timeframe.

12. The computer program product of claim 11 , wherein

C is 3600.

13. The computer program product of claim 11 , wherein the instructions are further translatable by the at least one processor to perform:

adjusting the tunable scaling factor to account for burst behavior of the API client; or

adjusting the value of the current time window and the tunable scaling factor.

14. The computer program product of claim 11 , wherein the instructions are further translatable by the at least one processor to perform:

tracking a number of client requests from the API client for the current time window; and

comparing the number of client requests from the API client for the current time window with the quota of requests allowed for the API client for the current time window.

15. The computer program product of claim 11 , wherein the instructions are further translatable by the at least one processor to perform:

tracking the number of active API clients, wherein tracking the number of active API clients comprises:

determining whether the API client is already connected; and

if the API client is not already connected:

marking the API client as connected; and

incrementing a counter tracking the number of active API clients.

Assignments (5)
CHANGE OF NAME Recorded Aug 13, 2025
From: BIGCOMMERCE PTY LTD
To: COMMERCE.COM PTY LTD
Reel/Frame 072007/0272 →
SECURITY INTEREST Recorded Mar 2, 2020
From: BIGCOMMERCE PTY LTD
To: WESTRIVER INNOVATION LENDING FUND VIII, L.P.
Reel/Frame 051977/0362 →
AMENDED AND RESTATED INTELLECTUAL PROPERTY SECURITY AGREEMENT Recorded Feb 28, 2020
From: BIGCOMMERCE PTY LTD
To: SILICON VALLEY BANK
Reel/Frame 052049/0692 →
SECURITY INTEREST Recorded Oct 30, 2017
From: BIGCOMMERCE PTY LTD
To: SILICON VALLEY BANK
Reel/Frame 043984/0926 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 15, 2016
From: KOSIM-SATYAPUTRA, QAMAL; CHRISTOPHER, SCOTT LACHLAN
To: BIGCOMMERCE PTY. LTD.
Reel/Frame 037500/0970 →
Continuity (2)
Provisional Application 61938038 · Feb 10, 2014
Related Publication 20150229579A1 · Aug 13, 2015
Cited By (1)
US 12,511,216