Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for twem-proxy. #18

Closed
HelloGrayson opened this issue Nov 12, 2014 · 3 comments
Closed

Support for twem-proxy. #18

HelloGrayson opened this issue Nov 12, 2014 · 3 comments
Assignees

Comments

@HelloGrayson
Copy link

Wondering what it would take to simplify the RedisStorage adapter to avoid methods twemproxy doesn't support - (lock, pipeline, script load, etc). Those looking to solve a high availability story will no doubt want to employ twemproxy for redis replication.

https://github.com/alisaifee/flask-limiter/blob/master/flask_limiter/storage.py#L268

Thoughts?

@alisaifee
Copy link
Owner

Hi @breerly. Thanks for the feedback.
I tried it out and with some juggling it would be possible to create a Storage subclass that is specific for twemproxy backed redis.

  • Do not load script in constructor and do it lazily in get_moving_window
  • disable transactions for pipeline
  • allow overriding the lock implementation

This would still require you to implement your own RedisTwemProxy storage - would that work for you?

@HelloGrayson
Copy link
Author

This sounds great.

@alisaifee alisaifee self-assigned this Nov 21, 2014
@alisaifee
Copy link
Owner

RedisStorage refactored in 0dd94b2 and released in 0.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants