Skip to content
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.

Anilist's Ratelimit #184

Open
hoangvu12 opened this issue Jun 16, 2022 · 3 comments
Open

Anilist's Ratelimit #184

hoangvu12 opened this issue Jun 16, 2022 · 3 comments

Comments

@hoangvu12
Copy link

Describe the bug
Anilist does limit the API for 90 requests per minute, I notice that you're using getServerSideProps, have you ever facing the problem that the server can't fetch the data due to ratelimit?

To Reproduce
Steps to reproduce the behavior:
Just go to some anime page over and over until the server reaches anilist's ratelimit. (I guess)?

Expected behavior
Some workarounds to avoid the anilist's ratelimit

Additional context
We could use CSR for this, but we can't SEO if using CSR and that's the huge pay-off.

@chirag-droid
Copy link
Owner

chirag-droid commented Jun 16, 2022

We can use incremental server side generation with revalidating cache every 5min or 10min. But this will only work with homepage I think.

@chirag-droid
Copy link
Owner

If you are hosting this for your own use, then it should be fine ig.

otherwise you can ask anilist to increase your ratelimit by giving them the ip address of the server. This depends on how the project is deployed.

@hoangvu12
Copy link
Author

hoangvu12 commented Jun 16, 2022

We can use incremental server side generation with revalidating cache every 5min or 10min. But this will only work with homepage I think.

Sure we could do that, also one thing that I didn't mention, if you send multiple requests that happens too fast, you'll get rate limit too, so I think you could wait a few seconds (2.5 seconds must be an ideal time) to avoid that.

image

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

No branches or pull requests

2 participants