PyrateLimiter icon indicating copy to clipboard operation
PyrateLimiter copied to clipboard

PyrateLimiter V3 release

Open vutran1710 opened this issue 10 months ago • 0 comments

Improvements & features

Phase I

  • [x] Much improved performance (better algorithm, better rate observations, very fast on consuming data)
  • [x] Better software design: much simpler, more extensible and easier to implement custom/extra logic without hacking around
  • [x] Out-of-the-box workable with both async & sync methods
  • [x] Decorator ready (both async & sync)
  • [x] Delay processing
  • [x] RedisAsyncBucket
  • [x] Multithreaded test
  • [x] Creating bucket at run time
  • [x] Bucket leak background-task
  • [x] Docs
  • [x] Changelog
  • [x] Release

Phase II

  • [ ] Dynamic changing rate-limit for bucket during run time
  • [ ] External rates store
  • [ ] FileLock for SQLite
  • [ ] Multi-process testing
  • [ ] DynamoDB

Phase III

  • [ ] Context
  • [ ] Negative weight

Performance

Inserting 10k items to a single bucket, using different backends - running synchronouly with a for-loop

# InMemoryBucket
Performance test: insert 10k items 0.17364001274108887(secs)

# RedisBucket
Performance test: insert 10k items 5.8455188274383545(secs)

# SQLiteBucket
Performance test: insert 10k items 3.9313011169433594(secs)

vutran1710 avatar Aug 17 '23 05:08 vutran1710