fixed first algo so it adds as many tokens as needed after more than one time period has passed

This commit is contained in:
2023-08-11 08:01:18 +03:00
parent 224cc4f5ec
commit 2c9f2a30f7
3 changed files with 27 additions and 6 deletions

View File

@@ -1,3 +1,20 @@
"""
TODO: implement leaky bucket
- in-app
- [x] in-memory
- [ ] redis
- [ ] redis cluster
- [ ] Flask middleware - https://flask.palletsprojects.com/en/2.1.x/quickstart/#hooking-in-wsgi-middleware
- [ ] NGINX - https://leandromoreira.com/2019/01/25/how-to-build-a-distributed-throttling-system-with-nginx-lua-redis/
- https://www.nginx.com/blog/rate-limiting-nginx/
- [ ] AWS API Gateway
- [ ] HAProxy Stick Tables - https://www.haproxy.com/blog/introduction-to-haproxy-stick-tables
- [ ] Cloudflare (Spectrum?)
TODO: implement fixed window counter
TODO: implement sliding window log
TODO: implement sliding window counter
TODO: use session IDs instead of IP address
"""
import flask as f
from . import algos