-
Notifications
You must be signed in to change notification settings - Fork 4k
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
基于请求延迟的并发控制 #2013
Labels
feature
new feature
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
brpc有const concurrenty limiter 和 auto concurrency limiter,用于限制服务的并发度,const concurrency limiter需要实际对服务压测配置,运营起来比较繁琐。auto concurrency limiter比较灵活,基于little’s low法则,但是在使用过程中发现会经常报ELIMIT。
在服务正常运营过程中,流量的增减,请求体的大小这些会有变化,涉及到磁盘请求,磁盘的响应会有波动,造成auto concurrency limiter算法得到的最大并发、最小延迟的波动比较大,所以会经常报ELIMIT。
基于此,提出一个想法,是否可以基于用户对请求的最大延迟要求max_latency,做一个latency concurrency limiter,用concurrency * avg_latency得到请求的预期处理时间,超过用户要求的max_latency就报ELIMIT。用户对请求延迟的要求一般都会比服务的min_latency要高很多,所以这个算法就不会造成太多的报错,也能比较容易运营。
@wwbmmm 辛苦看一下,这样的算法是否合理?
The text was updated successfully, but these errors were encountered: