Replies: 2 comments 2 replies
-
https://toutyrater.github.io/routing/balance1.html Load balancing parameters are not widely used in Xray. You can refer to the two links mentioned above for their usage. The mentioned usage (parameters) should be applicable to the latest version of Xray. I haven't personally tried it, so you'll need to give it a try yourself. This feature is not commonly used in China, in my opinion. |
Beta Was this translation helpful? Give feedback.
-
The balancer in Xray is a function that distributes network requests across multiple servers or paths. It's designed to optimize resource use, maximize throughput, minimize response time, and avoid overload of any single resource. The turn-by-turn config selection method you mentioned is likely referring to a round-robin method, where each server is selected in turns, which is one of the simplest methods for distributing client requests across a group of servers. Yes, it does divide the weight between different configurations. This means that if you have multiple servers or paths, the balancer will distribute the requests based on the weight you assign to each server or path. The effect on speed and ping can be both positive and negative. It can be positive because it can distribute the load and prevent any single server from becoming a bottleneck. However, if not configured properly, it can lead to increased latency and slower speeds. If one of the IPs is filtered or blocked, the balancer should automatically stop sending requests to that IP and distribute the load among the remaining IPs. Whether or not to recommend it depends on your specific needs. If you have a high volume of traffic and multiple servers, a balancer can be very beneficial. However, if you only have a single server or low traffic, it might not be necessary. Here's a basic example of how a balancer might be configured in JSON format: {
"routing": {
"balancers": [
{
"tag": "balancer",
"selector": [
"server1",
"server2",
"server3"
],
"strategy": {
"type": "Random",
"settings": {
"weights": [
3,
2,
1
]
}
}
}
],
"rules": [
{
"type": "Field",
"balancerTag": "balancer",
"network": "tcp,udp"
}
]
}
} In this example, the balancer is set to distribute requests between three servers (server1, server2, server3) using a random strategy. The weights are set so that server1 gets 3/6 of the requests, server2 gets 2/6 of the requests, and server3 gets 1/6 of the requests. The balancer is set to handle both TCP and UDP traffic. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Please give an explanation about the type of function of the balancer in Xray
Is there a turn-by-turn config selection method?
It means it divides the weight between different configurations?
Does it have a positive or negative effect on speed and ping?
If one of the IPs is filtered, will it be rejected?
Do you recommend it?
Beta Was this translation helpful? Give feedback.
All reactions