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

根据Redis的过期时间设定key,那岂不是没有滑动的策略?下一次进来正好上一个key过期,事实上并无法限流到 #2

Open
ReberMusk opened this issue Oct 26, 2021 · 7 comments

Comments

@ReberMusk
Copy link

No description provided.

@klboke
Copy link
Collaborator

klboke commented Jan 11, 2022

本身就是基于时间窗口的限流哦

@ReberMusk
Copy link
Author

本身就是基于时间窗口的限流哦

是固定窗口哦,没有滑动~

@klboke
Copy link
Collaborator

klboke commented Jan 11, 2022

是固定窗口的,用于特定的业务场景,比如发短信验证码,限制一分钟的频次。比如修改密码,限制一天的频次。等

@klboke
Copy link
Collaborator

klboke commented Jan 11, 2022

单时间窗口算法实现来说,当你把固定窗口设置成特别小的时候,其实和滑动窗口没啥区别了

@ReberMusk
Copy link
Author

是固定窗口的,用于特定的业务场景,比如发短信验证码,限制一分钟的频次。比如修改密码,限制一天的频次。等

感谢解答,非常有参考意义~ 🎉

@daiyun169
Copy link

集群版 redis 是需要注意 lua 脚本 slot 的问题。解决:http://www.redis.cn/topics/cluster-spec.html

@klboke
Copy link
Collaborator

klboke commented Aug 26, 2022

集群版 redis 是需要注意 lua 脚本 slot 的问题。解决:http://www.redis.cn/topics/cluster-spec.html

v1.3 版本已做处理了

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

No branches or pull requests

3 participants