-
-
Notifications
You must be signed in to change notification settings - Fork 543
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 Workflow #1107
Comments
The main rate limit is a 15 minute window, starting from the first request made with a given account. Within this window there's a certain amount of requests you can make, depending on the endpoint: Lines 11 to 23 in d175832
Note however that most of these endpoints have a second rate limit which kicks in if you make requests too rapidly. Even 1 request per second is enough to hit it. I haven't yet done extensive testing to find the exact limit, but that's why you can't just multiply e.g. the search endpoint limit of 500 with the amount of accounts you have. This does not happen with the main tweets endpoint (used for the Tweets tab on a profile, e.g. https://nitter.net/nasa), but pretty much all the other ones will "block" a guest account for the following 24 hours, and it's applied across endpoints, not just the one that got you blocked. There are no IP-based limits that I'm aware of. Accounts are randomly selected, and pending requests are tracked so the same one isn't used for too many requests at a time. |
Thanks for the detailed response @zedeus ! We are running our instance with one guest account for now and tried with a sleep interval 10 and 15 sec between each subsequent request and trying to hit around 40 search requests within the 15 mins window. But, we still got rate limit exceeded error in the 2nd run. Any thoughts on this ? |
That's surprising, but not much can be said without lots of extensive testing. |
Hi @zedeus , we tried with 3 guest accounts in the JSONL file with the similar approach and we got 429 again. However, it stayed a little longer this time (got blocked while processing 6th batch of those 40 requests per 15min window). Could you please explain how the public instances are utilizing those guest accounts to make it work? Do you think we are missing out on something? Please suggest. Also, what is the significance of "tokenCount" in nitter.conf. We set it to 3 to be in line with the number of guest accounts. Is that correct approach ? |
Hi @zedeus , did you get a chance to see above comment? Any thoughts? |
Public instances use 20k-50k guest accounts, not 3, that's how :) You can always visit /.health to check this information, e.g. nitter.net/.health
|
Right, I understand that, the public instances are using thousands of guest accounts. But my question is - how the guest accounts are being rotated or utilized to make sure we hit 40-50 "/search" API requests per guest account per 15min window? |
They're used randomly, but with a small amount you inevitably run into their really strange rate limit. |
Hi @zedeus , can you explain how the rate limit work here?
Thanks in advance!
The text was updated successfully, but these errors were encountered: