TURN server load balancing with round-robin DNS - good for WebRTC?

770 views
Skip to first unread message

Art Matsak

unread,
Mar 27, 2015, 5:12:07 PM3/27/15
to turn-server-project...@googlegroups.com
We have a browser-based WebRTC application and are looking into load balancing several rfc5766-turn-server instances with the help of round-robin DNS. The performance and load balance wiki says:
Set a less complex scheme with round-robin DNS. The client must send all its requests to the same DNS-discovered TURN server. That scheme supports all use cases.
Would a browser WebRTC client fulfill the condition in bold? In other words, is TURN server load balancing via round-robin DNS a valid approach for WebRTC?
 

Bradley T. Hughes

unread,
Mar 27, 2015, 5:17:25 PM3/27/15
to Art Matsak, turn-server-project...@googlegroups.com
Yes. We use do round-robin DNS for our TURN servers and it works well. I have seen cases where the same IP gets served to many clients on the same network by a caching DNS resolver, causing the TURN server to get a bit overloaded. I'd recommend setting the TTL low so that you can distribute the load better (60 seconds works for us).

--
Bradley T. Hughes
bradley...@appear.in

Oleg Moskalenko

unread,
Mar 27, 2015, 5:21:14 PM3/27/15
to Art Matsak, turn-server-project...@googlegroups.com
I have no idea how WebRTC browser client is implemented. The text that
you are reading is written for a generic TURN client. You can
experiment with WebRTC and let us know whether it works.
> --
> You received this message because you are subscribed to the Google Groups
> "TURN Server (Open-Source project)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
> turn-server-project-rfc57...@googlegroups.com.
> To post to this group, send email to
> turn-server-project...@googlegroups.com.
> Visit this group at
> http://groups.google.com/group/turn-server-project-rfc5766-turn-server.
> For more options, visit https://groups.google.com/d/optout.

Oleg Moskalenko

unread,
Mar 27, 2015, 5:22:35 PM3/27/15
to Bradley T. Hughes, Art Matsak, turn-server-project...@googlegroups.com
On Fri, Mar 27, 2015 at 2:17 PM, Bradley T. Hughes
<bradley...@appear.in> wrote:
>
>
> Yes. We use do round-robin DNS for our TURN servers and it works well. I have seen cases where the same IP gets served to many clients on the same network by a caching DNS resolver, causing the TURN server to get a bit overloaded. I'd recommend setting the TTL low so that you can distribute the load better (60 seconds works for us).
>

Cool. That's great to know.

Yoshimasa Iwase

unread,
Mar 27, 2015, 9:18:30 PM3/27/15
to turn-server-project...@googlegroups.com, ama...@gmail.com
Supposed I have two turn SV and two webrtc clients resolve different turn SV by DNS resolver, will webrtc media connection fail? ( i.e. DNS cache doesn't work in this case and DNS returns different address to webrtc client)

2015年3月28日土曜日 6時17分25秒 UTC+9 Bradley T. Hughes:

Oleg Moskalenko

unread,
Mar 27, 2015, 11:41:46 PM3/27/15
to Yoshimasa Iwase, turn-server-project...@googlegroups.com, ama...@gmail.com
Yes

Sent from my iPhone

Philipp Hancke

unread,
Mar 28, 2015, 12:00:34 AM3/28/15
to Oleg Moskalenko, Yoshimasa Iwase, turn-server-project...@googlegroups.com, ama...@gmail.com
uhm... why? client -> TURNSERVER A -> TURNSEVER B -> client is a completly valid scenario.

Oleg Moskalenko

unread,
Mar 28, 2015, 1:41:48 AM3/28/15
to Philipp Hancke, Yoshimasa Iwase, turn-server-project...@googlegroups.com, ama...@gmail.com
Sorry, I did not read the full text on my phone screen and I missed
the word "fail". Philipp, you are right, that is a totally valid use
case.

Oleg

Yoshimasa Iwase

unread,
Mar 28, 2015, 10:41:41 AM3/28/15
to turn-server-project...@googlegroups.com, philipp...@googlemail.com, iwase.y...@gmail.com, ama...@gmail.com
I see, thanks!

2015年3月28日土曜日 14時41分48秒 UTC+9 Oleg Moskalenko:
>> turn-server-project-rfc5766-turn-server+unsubscribe@googlegroups.com.
>> To post to this group, send email to
>> turn-server-project-rfc5766-turn-...@googlegroups.com.
>> Visit this group at
>> http://groups.google.com/group/turn-server-project-rfc5766-turn-server.
>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "TURN Server (Open-Source project)" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to
>> turn-server-project-rfc5766-turn-server+unsubscribe@googlegroups.com.
>> To post to this group, send email to
>> turn-server-project-rfc5766-turn-...@googlegroups.com.

Art Matsak

unread,
Mar 28, 2015, 3:42:48 PM3/28/15
to turn-server-project...@googlegroups.com, ama...@gmail.com
Thank you for sharing your insights, Bradley! That's great news.

Arafat Al Mahmud

unread,
Mar 31, 2015, 3:40:05 AM3/31/15
to turn-server-project...@googlegroups.com, ama...@gmail.com
Can you please provide a brief step by step directions of setting up turn server load balance scheme ?
Reply all
Reply to author
Forward
0 new messages