eawag-surface-waters-research / alplakes-fastapi

FastAPI for the Alplakes project
0 stars 0 forks source link

Rate limitations for IPs #9

Open JamesRunnalls opened 1 month ago

JamesRunnalls commented 1 month ago

Add some middleware to limit the number of calls to the API from a single IP address. This won't prevent a DoS attack but should prevent accidental overload from individuals.

JamesRunnalls commented 1 month ago

https://www.youtube.com/watch?v=2-exKF2Vszg

JamesRunnalls commented 1 month ago

https://github.com/laurentS/slowapi

JamesRunnalls commented 1 month ago

https://thelearningfellow.medium.com/quick-and-easy-rate-limiting-for-fastapi-6be34e8102a7

JamesRunnalls commented 1 month ago

Might need to add Redis for keeping track of events, this could be included in the docker-compose