Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current ratelimit headers landscape #25

Open
8 of 9 tasks
ioggstream opened this issue Dec 30, 2020 · 0 comments
Open
8 of 9 tasks

Current ratelimit headers landscape #25

ioggstream opened this issue Dec 30, 2020 · 0 comments
Labels
info no-action No changes to the spec

Comments

@ioggstream
Copy link
Collaborator

ioggstream commented Dec 30, 2020

Compliant implementations: Zalando, IBM, 3scale, Kong, Dutch government, pipedrive, Envoy

Explicit support via RateLimit-* or X-RateLimit-* from:

WIP in

Support via configuration from:

Uses 429 and the triple like the following

x-ratelimit-limit: 5000
x-ratelimit-remaining: 50
x-ratelimit-reset: 10  # delta seconds

Can be implemented? Yes

Google

Returns 429 or 403 depending on the API.

Yelp

Returns 429

RateLimit-DailyLimit: 5000
RateLimit-Remaining: 4999
RateLimit-ResetTime: 2018-03-28T00:00:00+00:00

Considerations:

  • doesn't prefix headers with Yelp- see https://tools.ietf.org/html/rfc6648
  • uses RFC3339 which is fine but different from Retry-After, nice thing uses another header name
  • non clock-skew safe

Can be implemented with this spec? Yes, eg:

RateLimit-Limit: 5000
RateLimit-Policy:    5000; w=86400   # expliciting daily window in the optional comment part
RateLimit-Remaining: 4999
RateLimit-Reset: 36000                             # 10 hours before reset time

Amazon

Amazon uses custom headers with x-mws-quota-resetsOn using the IMF-fixdate syntax.
The time-window is hourly.

x-mws-quota-max: 3600
x-mws-quota-remaining: 10
x-mws-quota-resetsOn: Wed, 06 Mar 2013 19:07:58 GMT

Can be implemented with this spec? Yes, switching to delta-seconds eg:

RateLimit-Limit: 3600
RateLimit-Policy: 3600;w=3600
RateLimiit-Remaining: 10
RateLimit-Reset: 1000

Github

Uses 429 and the triple like the following

x-ratelimit-limit: 5000
x-ratelimit-remaining: 50
x-ratelimit-reset: 1563525874  # unix timestamp

considerations:

  • non clock-skew safe
  • different from retry-after

Can be implemented with this spec? Yes, but should change the x-ratelimit-reset semantic

twitter, axway, oracle

Uses 429 and the triple like the following (same as github, but with different names)

x-rate-limit-limit: 5000
x-rate-limit-remaining: 50
x-rate-limit-reset: 1563525874  # unix timestamp

mulesoft

https://docs.mulesoft.com/api-manager/2.x/rate-limiting-and-throttling-sla-based-policies

Uses delta-seconds with milliseconds

x-ratelimit-limit: 5000
x-ratelimit-remaining: 50
x-ratelimit-reset: 12000  # milliseconds

Other implementers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info no-action No changes to the spec
Projects
Development

No branches or pull requests

1 participant