5 ms·
Thanks! The buckets are already done per-user so it is very simple to make the constant factors be user-dependent. For my example in https://gist.github.com/pt
by ptarjan 9y ago
Thanks! The buckets are already done per-user so it is very simple to make the constant factors be user-dependent.
For my example in https://gist.github.com/ptarjan/e38f45f2dfe601419ca3af937fff574d#file-1-check_request_rate_limiter-rb https://gist.github.com/ptarjan/e38f45f2dfe601419ca3af937fff... you would just set REPLENISH_RATE to be a different value for different users.
- fspear 9y agoThanks!