Skip to content
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 future request + fallbacktag problems #3164

Closed
s-kile opened this issue Mar 20, 2024 · 15 comments
Closed

balancer future request + fallbacktag problems #3164

s-kile opened this issue Mar 20, 2024 · 15 comments

Comments

@s-kile
Copy link

s-kile commented Mar 20, 2024

  • balancer should use to configs with ping less than a number (like ping<1000). what is the point of roundrobin or random strategy when configs don't ping!

  • observatory could test speed of outbounds and balancer can use best of them (like in leastping). just having a good ping doesn't mean the outbound can work well!

my idea for this is downloading a 10 or 5mb file (and not saving it) (the download link can be set in config.json) by outbounds that have a ping less than a number, and measuring the time taken. it takes about 1 min for 5 outbounds. i did this in a fork (a long time ago. and i'm not export enough to add it to this project) and i really felt that xray needs it. the only problem was that it takes a lot of time (but it's worth the time and balancer can use least ping for first 1 or 2 minutes)

  • fallbacktag falls back to another balancer not just an outbound (like we are having two balancers. and don't want to use second one if the first one is working

idk if this can be done by loopback outbound . i'm waiting for next release to test

@yuhan6665 @hossinasaadi

@Fangliding
Copy link
Member

Fangliding commented Mar 20, 2024

再加个selector吧 再搞个网页面板吧 再搞个分组路由吧 provider也别落下了 以后这里改名Xclash

@yuhan6665
Copy link
Member

@s-kile thanks for your idea. 我思考了一下 确实利用 loopback outbound 已经可以实现 balancer fallback 套娃(虽然略麻烦但是考虑到这是小众需求 我觉得现在这个也还行)
@Fangliding 这些功能属于 low hanging fruit(鉴于 clash 停更 我们可以把客户端做的更好)

@RPRX
Copy link
Member

RPRX commented Mar 20, 2024

fallbacktag falls back to another balancer not just an outbound (like we are having two balancers. and don't want to use second one if the first one is working

这个提过 #3114 (comment)本来 v1.8.9 就打算带上它的

再加个selector吧 再搞个网页面板吧 再搞个分组路由吧 provider也别落下了 以后这里改名Xclash

这么搞确实成 Claxh 了

@Fangliding 这些功能属于 low hanging fruit(鉴于 clash 停更 我们可以把客户端做的更好)

好,这就复活 X-flutter

@APT-ZERO
Copy link

Let's add a selector, let's make a web panel, let's make a group routing, don't leave out the provider, and then rename this place to Xclash.

No other client adds xray exclusive features like mux.cool, so it's not bad to improve xray-core for client

@SatenRuiko-Lv0
Copy link

@s-kile thanks for your idea. 我思考了一下 确实利用 loopback outbound 已经可以实现 balancer fallback 套娃(虽然略麻烦但是考虑到这是小众需求 我觉得现在这个也还行) @Fangliding 这些功能属于 low hanging fruit(鉴于 clash 停更 我们可以把客户端做的更好)

#3186 (comment)
@yuhan6665 大佬,我也发现了这个问题,而且似乎leastping不支持fallback?如果要加这个功能的话,可否让需要(burst)observatory的routeBalancers都执行类似probeInterval周期没ping通就自动转移下一个节点直到可用为止的功能?感谢您的解答

@yuhan6665
Copy link
Member

最新的main leastping已经支持fallback 我的建议是简化配置 即fallback指向一个稳定节点出站

@s-kile
Copy link
Author

s-kile commented Mar 31, 2024

The latest main leastping already supports fallback. My suggestion is to simplify the configuration, that is, fallback points to a stable node outbound.

fallback and loopback work great! do you have any plans to add first future? a lot of times random and roundrobin strategy just use non-working outbounds. (and we have to refresh 5 ttimes just to load a page) and now that observatory can measure pings, it would be great if these two strategies use configs that have a ping and are working

@pulsarice
Copy link

I tried using a balancer as fallback for another balancer (both with leastPing strategy), but it didn't work and logged an error message (something like "outbound not found").
Is it currently possible to fill fallbackTag with another balancer name?

@yuhan6665
Copy link
Member

No, you can only fallback to outbound. That's why loopback is needed

@s-kile
Copy link
Author

s-kile commented Apr 26, 2024

do you have any plans to add first future? a lot of times random and roundrobin strategy just use non-working outbounds. (and we have to refresh 5 ttimes just to load a page) and now that observatory can measure pings, it would be great if these two strategies use configs that have a ping and are working

1.8.11 and still waiting :_)

@pulsarice
Copy link

do you have any plans to add first future? a lot of times random and roundrobin strategy just use non-working outbounds. (and we have to refresh 5 ttimes just to load a page) and now that observatory can measure pings, it would be great if these two strategies use configs that have a ping and are working

1.8.11 and still waiting :_)

So why not just use leastLoad instead of random or roundrobin?
I have 9 outbounds and with leastLoad strategy and Interval=20s I get some kind of load balancing. (I can see in access.log that the active outbound is changing every few seconds and it also skips non-working outbounds)

@yuhan6665
Copy link
Member

yuhan6665 commented Apr 26, 2024

I have 9 outbounds and with leastLoad strategy and Interval=20s

You guys are creative. Always do something I can't dream of

@pulsarice
Copy link

I have 9 outbounds and with leastLoad strategy and Interval=20s

You guys are creative. Always do something I can't dream of

The Iranian GFW makes us jump through hoops :))

@s-kile
Copy link
Author

s-kile commented Apr 27, 2024

do you have any plans to add first future? a lot of times random and roundrobin strategy just use non-working outbounds. (and we have to refresh 5 ttimes just to load a page) and now that observatory can measure pings, it would be great if these two strategies use configs that have a ping and are working

1.8.11 and still waiting :_)

So why not just use leastLoad instead of random or roundrobin? I have 9 outbounds and with leastLoad strategy and Interval=20s I get some kind of load balancing. (I can see in access.log that the active outbound is changing every few seconds and it also skips non-working outbounds)

because random uses lots of outbounds at a time and not just switching every 20sec

@yuhan6665
Copy link
Member

Currently no plan to add more to roundRobin and random. We are open to extend leastLoad. If you have specific idea, please open a separate ticket. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants