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

question about multiple coturn servers in selfhosted #1286

Open
Fantu opened this issue Nov 3, 2023 · 3 comments
Open

question about multiple coturn servers in selfhosted #1286

Fantu opened this issue Nov 3, 2023 · 3 comments

Comments

@Fantu
Copy link
Contributor

Fantu commented Nov 3, 2023

Hi, now is possible set multiple coturn server, FWIK for example:

    "TURNConfig": {
        "TimeBasedCredentials": false,
        "CredentialsTTL": "12h0m0s",
        "Secret": "secret",
        "Turns": [
            {
                "Proto": "udp",
                "URI": "turn:server1.example:3478",
                "Username": "self",
                "Password": "password"
            },
            {
                "Proto": "udp",
                "URI": "turn:server2.example:3478",
                "Username": "self",
                "Password": "password"
            }
        ]
    },

How are these used?
Is each request sent to a random coturn server on the list or does it follow the order and use the subsequent ones if the first one is not reachable?

@bcmmbaga
Copy link
Contributor

bcmmbaga commented Nov 3, 2023

Hi @Fantu, They are all used at the same time. It always connects to all the URLs there and checks them for connectivity. If one is able to connect, it will use it.

@mlsmaycon
Copy link
Collaborator

the agent will connect to all TURN servers, and them it will use these connections to check if it can communicate with the other peers. If one responds faster, it will use it instead of the other, but there is no way to order these checks besides how you configure them.

Once a turn is selected and used for the connection, the agents periodically send checks to validate if they are still available; if something goes wrong with the checks, the negotiation is restarted. There is no use of the next relay server in this case (not yet)

In that sense, ICE chooses the faster one to reply to the initial check. Which, in many cases, is the one with a lower latency

@Fantu
Copy link
Contributor Author

Fantu commented Nov 3, 2023

thanks to all for the replies
the @mlsmaycon one is the more complete, I suggest should be used to improve the documentation as can be useful to know

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

3 participants