2 ms·
A TURN server has to do much less computation, and it also doesn't need to decrypt the payload. It's more or less a fancy packet forwarder. In addition, only
by jlokier 7y ago
A TURN server has to do much less computation, and it also doesn't need to decrypt the payload. It's more or less a fancy packet forwarder.
In addition, only a fraction of users will need TURN; the rest can use direct peer connections with the aid of NAT traversal; the two kinds of connection are more or less the same to higher layers. Conversely, if the application depended on an application server to process data, chances are you wouldn't implement a second version of the same protocol that works without the server.
So a single TURN server can handle a lot more traffic than an application server, is potentially more secure, and is more easily shared between different applications, and even different owners.
If you want it geo-distributed for latency, the ability to share the same TURN servers between different applications and owners gives you cost-latency advantages too.
- ackbar03 7y ago> In addition, only a fraction of users will need TURN; the rest can use direct peer connections with the aid of NAT traversal; Is there actually any data on this or is it mostly anecdotal? Because I've done my own experiments on hole punching before and its almost impossible with today's routers, almost all of which it seems implement symmetric NAT (impossible to match the ports after initial contact with the STUN sever cause it becomes assigned randomly). Compound this with the fact that some ISPs have more than 1 layer of NAT, I have trouble believing that the majority of Slack users either have a direct public IP or a convenient way to conduct NAT traversal successfully.
- hatefulmoron 7y ago> I have trouble believing that the majority of Slack users either have a direct public IP or a convenient way to conduct NAT traversal successfully. Google's libjingle documentation[1] alludes to a statistic that says that "8% of connection attempts require an intermediary relay server". This will obviously depend on the user demographic, I would guess that users on corporate connections are probably less likely to form successful p2p connections. [1]: https://developers.google.com/talk/libjingle/important_concepts?csw=1 https://developers.google.com/talk/libjingle/important_conce...