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

Github API rate limiting issue #30

Open
metrue opened this issue Dec 2, 2024 · 2 comments
Open

Github API rate limiting issue #30

metrue opened this issue Dec 2, 2024 · 2 comments

Comments

@metrue
Copy link
Collaborator

metrue commented Dec 2, 2024

Github REST API enables the rate limit, in the current implementation, tinymind will fetch the content via GitHub API for each blog browsing, and it will easily reach the rate limit threshold.

There're two major options to fetch content from GitHub: Webhook or Fetch Queue. It'd better to investigate and improve the fetching logic.

https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api?apiVersion=2022-11-28
https://docs.github.com/en/rest/using-the-rest-api/best-practices-for-using-the-rest-api?apiVersion=2022-11-28

@mazzzystar
Copy link
Owner

I understand that it seems like:

  • For public repositories, the rate limit counts against the browser's IP address as the basis for API rate limit, meaning each user has 60 access attempts per hour.
  • For private repositories, using auth key allows for a limit of 5,000 requests per hour, which I feel might be barely sufficient when the number of users is not high.

@metrue
Copy link
Collaborator Author

metrue commented Dec 26, 2024

For public repositories, the rate limit counts against the browser's IP address as the basis for API rate limit, meaning each user has 60 access attempts per hour.

I frequently get blocked by the rate limiting quota during the development, I think it's because there're too much hot reloading and fetching data too frequently, especially I have some client data request added to my version codes.

For private repositories, using auth key allows for a limit of 5,000 requests per hour, which I feel might be barely sufficient when the number of users is not high.

Fetching with auth key is enough but it's for the login visitors (basically they are the bloggers), for the blog visitors most of them are not random anonymous without the auth key so when a site become popular, the rate limiting will be a issue I think.

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