You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should add rate-limiting in some places, especially for endpoints where we have request limits. At the moment these are the following endpoints:
/auth/login: SFU CAS
/translink: realtime endpoint is limited to 1000 requests a day
There are a few places we can add rate-limiting.
Nginx
This can limit certain IPs before it reaches the web server, but the University and its residences shares IPs, so this needs to handled carefully.
Web Server
There are some libraries we can use, but we need to see whether adding this is compatible with our current setup. We use multiple uvicorn workers for concurrency, so in-memory solutions will not work (I tried and it kinda sucked). One thing we could try is adding sqlite, to manage projects that need durability, but don't require a long-lived database.
Activity
[-]Add rate-limiting to Nginx and maybe to the web server.[/-][+]Explore rate-limiting[/+]