如何在1秒内处理案件,例如10秒钟,而在1分钟内的电话限制器不超过50个呼叫
如何在1秒内处理10个呼叫,而在1分钟内的速度限制器在春季的1分钟呼叫不超过50个呼叫。 我正在制作一个春季限制器,但任何人都可以告诉我我可以做的方式。
How to handle the case like 10 calls in 1 sec and not more than 50 calls in 1 minute in rate limiter in Spring.
I am making a spring rate limiter but can anyone tell me the ways I can do it please.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您要在单个服务器上运行基于弹簧靴的API,请查看Guava Ratelimiter。您可以在此处找到有关如何实现Guava Ratelimiter的说明: https://www.baeldung.com /guava-rate-limiter
If you are going to be running your Spring-Boot based API on a single server then look into Guava Ratelimiter. You can find instructions on how to implement the Guava Ratelimiter here: https://www.baeldung.com/guava-rate-limiter