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

Rate limit headers #350

Open
russbiggs opened this issue Apr 19, 2024 · 3 comments
Open

Rate limit headers #350

russbiggs opened this issue Apr 19, 2024 · 3 comments

Comments

@russbiggs
Copy link
Member

Currently we are using headers as drafted in this RFC: https://datatracker.ietf.org/doc/draft-ietf-httpapi-ratelimit-headers/

Given that this is not yet finalized we should maybe used custom X- prefixed headers in the meantime, then upgrade to the standard (if and when it finalizes) and decprecate the X- prefix.

Github's headers seem like a good one to follow

https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api?apiVersion=2022-11-28#checking-the-status-of-your-rate-limit

@four43
Copy link

four43 commented Apr 23, 2024

Check this one out: https://datatracker.ietf.org/doc/html/rfc6648

@russbiggs
Copy link
Member Author

@four43 I've come across that "best practice" when investigating but it seems like hardly anyone is following it. Especially for the rate limiter headers given there is no finalized standard, it doesn't leave a lot of options. Even a quite new large scale API like OpenAI https://platform.openai.com/docs/guides/rate-limits/rate-limits-in-headers uses the X- prefix rate limiting headers.

@four43
Copy link

four43 commented Apr 23, 2024

I've landed on that as well in my projects. I just didn't want to bias you, just thought I'd throw out that resource. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants