How to Design a Scalable Rate Limiting Algorithm
For a different view on the topic watch "Stop Rate Limiting! Capacity Management Done Right" https://www.youtube.com/watch?v=m64SWl9bfvkThe basic premise is not do do req/s limiting but rather concurrency limiting which results in req/s limiting by itself.Concurrency limiting is rather simple and doesn't require a lot of code complexity.