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
关于balancer的建议 #1115
Comments
没看过源码,但你说的都不对啊。
|
假定场景:(client c) -> (proxy a) -> ( b1-b3) -> (website w),a有多个outbound b1,b2,b3,在a上配balancer,选择响应最快的b,leastping计算的delay是指a到b的时延,还是指a通过b访问w的时延呢?我理解是a到b,不知道是否正确。 |
观测组件里面有probeURL项指定探测连接,探测的是client经过观测组件subjectSelector项选择的客户端outbounds访问probeURL的用时。至于服务端outbounds,是无法从客户端选择的。 |
那么探测的是c->w的用时,还是a->w的用时? |
都说了是从client发起http请求,你在c上配置负载均衡,测的就是从c到probeURL的用时。在a上配置负载均衡,测的就是从a到probeURL的用时。 |
嗯,谢谢解惑。如果这样的话,probeurl设置为http://www.google.com/generate_204就没问题了,能够真实的反映各个outbound的访问时延。定时并发探测只能等fly v5出来以后再修改了吧。 |
1、学习了源码,目前负载均衡的策略是random和leastping,leastping是使用http的get方法,考虑到一些服务器不允许提供http服务的场景,建议能支持类似tcping的方法,增强适用范围。
2、此外对检查各服务器delay的时机,是否可以使用单独的线程轮询更新,这样可以不影响每次实际通过代理的访问请求。
The text was updated successfully, but these errors were encountered: