lukePeavey / quotable

Random Quotes API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Announcement: Added Rate Limit

lukePeavey opened this issue · comments

The API was down for several days last week due to a sudden increase in request volume. On Friday morning, several IP addresses started flooding the API with thousands of requests per minute (> 10 million requests per day). Its possible that these requests are coming from a legitimate project with a large number of users, but it seems unlikely.

Either way, our MongoDB Atlas deployment cannot handle this request volume. This was maxing out the resources of the Atlas cluster, causing the API to crash.

To prevent this, I added a rate limit, which is currently set to 100 requests per minute (by IP address). We were are still getting a high volume of requests from a couple IP addresses, this is no longer impacting API performance.

Important

If you are using this API for a project that will be impacted by a rate limit, please post a comment and let me know. If you have a project that is making a large number of requests, we will try to work someone out so your project is not impacted.

Also, if anyone has any feedback or suggestions regarding the rate limit, please feel free to comment. We will try to adjust it so that it has a minimal impact on people using the API