Multiple TURN servers for Janus instance

Hello!

We are trying to add multiple TURN servers for Janus self. I see in configuration, that I can specify only one server in: turn_server param.

Also I see rest api for TURN servers fetch configuration. So backend can send response with array of uris. So if there will be multiple, Janus can consume them? How will it choose what server to pick?

First of all, you should not configure TURN for Janus itself unless you REALLY need it: it’s users that need TURN, 99% of the times, not Janus.

That said, no, you can only configure a single TURN server to be used. The REST API doesn’t return urls, it returns the TURN info to use.

  1. Yes, I understand this. But we have Janus sit behind docker bridge network overlay. So this way Janus needs to have its own TURN server.

  2. How does it not return urls? If based on this, the response comes with uris array:

{
 username: "1375043478:abcd1234",
 password: <HMAC("1375043487:abcd1234", SS)>
 ttl: 86400,
 uris: [
 "turn:turn.bar.com:3478?proto=udp",
 "turn:turn.bar.com:3478?proto=tcp",
 "turns:turn.bar.com:443?proto=tcp"
 ]
}

My bad, I was actually remembering it wrong! When using the TURN REST API, we do indeed support multiple TURN servers.

1 Like