Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

用java并发包中的Semaphore做高并发限流??
直接tryAcquire 失败就快非阻塞速返回
有啥坑吗?
??
另外hystrix的信号量隔离就是限流功能吧
为何很多文章说hystrix没有限流功能
然后zuul还需要引入guava的限流ratelimit?
直接用hystrix的信号量隔离或者线程池隔离来限流不行吗?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
316 views
Welcome To Ask or Share your Answers For Others

1 Answer

其实可以,比如 Netflix 开源的 Hystrix 还有 Zuul 的早先版本,就支持以这种模式做限流。不过后来 Zuul 还是换成漏桶和令牌桶这种方式了。

但这个这是单机的,集群限流你还得用个分布式的东西。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...