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

add Round-Robin Strategy to balancer #2844

Merged
merged 2 commits into from
Dec 24, 2023

Conversation

hossinasaadi
Copy link
Contributor

Round-Robin Strategy :

    "routing": {
        "domainStrategy": "AsIs",
        "rules": [
            {
                "type": "field",
                "balancerTag": "b1",
                "domain": [
                  "ipv4.seeip.org"
                ]
              }
                    
        ],
        "balancers" : [{
            "tag": "b1",
            "selector": ["proxy"],
            "strategy": {
                "type":"roundRobin"
            }
          }
        ]
    },

@yuhan6665 yuhan6665 merged commit 01c14a5 into XTLS:main Dec 24, 2023
34 checks passed
@yuhan6665
Copy link
Member

Thanks!

@hossinasaadi hossinasaadi deleted the balancerStrategy branch December 24, 2023 20:41
@chika0801
Copy link
Contributor

@hossinasaadi

Hi, please tell me what roundRobin is used for. Is it when my outbound tag has proxy1 proxy2 proxy3 prorxy4. Due to the use of "selector": ["proxy"], the proxy can match to the 4 outbound tags proxy1 proxy2 proxy3 prorxy4.

Is it then a loop that uses proxy1 proxy2 proxy3 prorxy4 proxy1 proxy2 proxy3 prorxy4 in turn?

@hossinasaadi
Copy link
Contributor Author

@hossinasaadi

Hi, please tell me what roundRobin is used for. Is it when my outbound tag has proxy1 proxy2 proxy3 prorxy4. Due to the use of "selector": ["proxy"], the proxy can match to the 4 outbound tags proxy1 proxy2 proxy3 prorxy4.

Is it then a loop that uses proxy1 proxy2 proxy3 prorxy4 proxy1 proxy2 proxy3 prorxy4 in turn?

Hi, yes it send traffic one by one in order

@chika0801
Copy link
Contributor

Thank you for your help. When the next version is released, I will take this and add it to the documentation to help others.

@chika0801
Copy link
Contributor

I tested the feature myself and it works properly as you said. It is exactly this loop: proxy1 -> proxy2 -> proxy3 -> prorxy4 -> proxy1 -> proxy2 -> proxy3 -> prorxy4 -> proxy1.

Thanks for your contribution.

@hossinasaadi
Copy link
Contributor Author

I tested the feature myself and it works properly as you said. It is exactly this loop: proxy1 -> proxy2 -> proxy3 -> prorxy4 -> proxy1 -> proxy2 -> proxy3 -> prorxy4 -> proxy1.

Thanks for your contribution.

glad to hear that ❤️

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

Successfully merging this pull request may close these issues.

3 participants