-
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
Least load balancer #2999
Least load balancer #2999
Conversation
…82018a74a6d519c7e121816) Some changes will be necessary to integrate it into V2Ray
ticker.Close does not close ticker.C
不知道是不是BUG, 似乎 roundrobin 策略会报错: |
感谢测试我修一下之后再ping你 :) |
@qwerr0 麻烦再测一下 |
{
"tag": "auto-fallback",
"selector": ["eq-grpc-", "sr-grpc-", "cf-grpc-"],
"fallbackTag": "reject",
"strategy": {
"type": "leastLoad",
"settings": {
"healthCheck": {
"interval": 30,
"sampling": 5,
"destination": "http://www.google.com/gen_204",
"connectivity": "http://connectivitycheck.platform.hicloud.com/generate_204",
"timeout": 5
},
"costs": [
{
"match": "eq-grpc-",
"value": 4
},
{
"match": "sr-grpc-",
"value": 8
},
{
"match": "cf-grpc-",
"value": 16
}
]
}
}
} leastPing 也会出现空指针错误 {
"tag": "auto-fallback",
"selector": ["eq-grpc"],
"fallbackTag": "reject",
"strategy": {
"type": "leastLoad"
}
}
配置上, leastLoad + "maxRTT": 1000 也会报错, leastPing 不会: {
"tag": "auto-fallback",
"selector": ["eq-grpc"],
"fallbackTag": "reject",
"strategy": {
"type": "leastLoad",
"settings": {
"maxRTT": 1000
}
}
} |
@qwerr0 考察了一下是配置格式变了 不要写 “healthCheck” 而是在最外层与 “routing” 同级加上:
leastLoad 需要
|
infra/conf: failed to parse to strategy config. > invalid duration: 1000 |
Hi, And why there is 'destination' and 'connectivity' together? is 'connectivity' a fallback for 'destination'? Can i use the results of leastLoad balancer inside a roundRobin balancer? is tolerance same as tolerance in Clash.Meta, but it's in Rate/Percent only? + an Idea |
@APT-ZERO this is different from what clash-meta has. See v2fly/v2ray-core#589 for details. We will be open to further improvements once this is merged. But please do some test with it before that. |
过年了忙着赶亲, 前几天没来得及测试, 定义好 observatory 用着没出啥问题了, leastPing 正常, leastLoad 测试也正常 |
probeURL 应该是 probeUrl 吧? 而且似乎不能直接填域名, 要填网址 我觉得其实observatory可以添加一个选项, 就是类似于 Clash Meta 的 outbound 失败后(比如连接被重置 连接超时)自动开始检查健康状态, 我把我的一个 outbound down 掉以后, Xray 要至少等待 interval 后才会开始检查健康状态然后才会切到正常的 outbound 还有一个就是负载均衡就不好实现了, 我有几组gRPC, 每一组gRPC的地址端口都是一样的, 目的是为了建立多个TCP连接缓解 TCP 队头堵塞, selector 只能选单个 outbound, 如果能选除了自身以外的 balancer 就好了 |
感谢大家测试及提供宝贵意见 以后可以继续改进 |
This reverts commit fa5d7a2.
This reverts commit fa5d7a2.
This reverts commit fa5d7a2.
请问大佬, |
@BI7PRK destination 是代理测速 connectivity 是本地不代理确认网络联通性的 如果网络不通 不会给节点减分 |
leastLoad 真的有起作用吗?
日志打印 app/router: least load: no qualified outbound
每次修改配置文件调整outbound里的顺序再重启,就会发现最终走的是第一个outbound |
@terrason tag1, tag2 是示例需要你改成你想测试的 outbound tag |
谢谢回复,我已经修改了burstObservatory配置如下: "burstObservatory": {
"subjectSelector":[
"proxy-DMIT",
"proxy-RackNerd-Dallas",
"proxy-RackNerd-Seattle",
"proxy-bandwagonhost"
],
"pingConfig": {
"destination": "http://www.google.com/gen_204",
"interval": "1h",
"connectivity": "http://connectivitycheck.platform.hicloud.com/generate_204",
"timeout": "30s",
"sampling": 2
}
} 但是还是一样的报错
我使用的版本是1.8.8,最新版是指用最新源码构建吗? 补充: |
对 最新 main 加了 initial check |
can someone explain how this works? least load on the config (i mean least traffic and... ?) does it care about config pings? |
the Least Load Balancer distributes traffic across multiple outbound proxies based on their real-time performance as determined by periodic health checks. This helps optimize routing by favoring faster, less congested outbounds. The config allows customizing the health check behavior and fallback logic. |
This 这个 |
To check "connectivity" URL, how does Xray resolve destination IP? witll it use core's internal DNS server or will it use the operating system's resolver? |
are there any web panels for Xray that support load balancing? upd: 3x-ui does |
Thanks @qjebbs @xiaokangwang @nekohasekai @4-FLOSS-Free-Libre-Open-Source-Software @AkinoKaede @KujouRinka !