AMZ DIGICOM

Digital Communication

AMZ DIGICOM

Digital Communication

What is a TURN server?

PARTAGEZ

A TURN server is a specialized network server that allows data transmission between two devices when they cannot connect directly due to firewalls or NAT routers. It is mainly used in real-time communication applications.

Virtual servers (VPS)

Cost-effective VPS on Dell Enterprise servers

  • 1 Gbps bandwidth and unlimited traffic

  • 99.99% availability and ISO certification

  • Award-winning 24/7 support and personal advisor

What is a TURN server?

A TURN (Traversal Using Relays around NAT) server is a network service that acts as relays and transmits data between two participants.

It becomes necessary when direct peer-to-peer connections fail, for example due to restrictive firewalls or complex NAT configurations. In these cases, the TURN server relays all traffic through itself and acts as an application relay.

The TURN server provides a client with a public relay address and port through which other participants can send data. This data is then transmitted back to the final destination.

TURN builds on existing protocols like UDP or TCP and is closely related to real-time communication. Compared to simpler methods, TURN is more resource intensive, but provides better connection reliability. It is therefore essential in many professional communication solutions.

Note

In many scenarios, a STUN server is used upstream of a TURN server. A STUN server helps endpoints determine their public IP address and port assignment in order to establish a direct peer-to-peer connection. If this connection fails due to restrictive firewalls or NAT types, the TURN server takes over by relaying all traffic.

The operation of a TURN server is fundamentally simple: we can see it as a intermediate which connects two interlocutors when they cannot connect directly.

  1. First, the client establishes a connection with the TURN server and authenticates there, usually using temporary access data.
  2. After successful authentication, the client requests an “allocation”. The TURN server then reserves a public relay address as well as a port, via which the client becomes accessible from the outside. The client then communicates this relay address to his interlocutor.
  3. Instead of communicating directly with each other, the two terminals send their data packets to the TURN server. THE server then acts as an intermediate stationreceives incoming packets and forwards them to the other participant.

This mechanism works for both outgoing and incoming connections and effectively bypasses NAT and firewall restrictions. TURN (specified in the RFC 8656) supports different transport protocols like UDP and TCP to adapt to maximum network conditions.

If necessary, exchanges with the TURN server can be secured via TLS depending on the configuration. This is often the case in highly restricted corporate networks, to ensure data confidentiality through encryption.

A TURN server manages sessions, allocations and timeoutsand can thus use resources efficiently and prevent abuse. While retransmission via the server results in higher latency and additional bandwidth consumption, TURN promotes more stable and reliable communication, even under complex network conditions.

What are the areas of application of a TURN server?

TURN servers are mainly used in real-time communication applications. Typical examples include video conferencing systems, VoIP telephony and online gaming. WebRTC-based applications also frequently use TURN.

TURN becomes relevant whenever users are behind firewalls or NATs. Without a TURN server, many connections would be interrupted or impossible to establish. This is particularly common in business networkswhere TURN guarantees maximum accessibility. Developers also use TURN as fallback mechanism when direct connections fail.

Note

A concrete example of using a TURN server is Nextcloud Talk. Nextcloud Talk’s audio and video features rely on WebRTC and require reliable connections between participants. When users are behind firewalls or in different networks, a TURN server is necessary to enable stable communications.

What hardware does a TURN server need?

To operate a TURN server, no specialist equipment is required. However, sizing server resources is essential. VPS (Virtual Private Server) servers are preferred because they offer a good balance between performance, cost and flexibility.

A VPS provides dedicated resources like CPU cores, RAM and guaranteed bandwidth, which is important for a TURN server:

  • The processor (CPU) manages packet routing, sessions and, if necessary, encryption.
  • Sufficient RAM is required to handle a large number of simultaneous connections stably.
  • The network interface is critical because all media traffic passes through the TURN server and can reach high volumes.

A fast and stable connection with low latency directly influences audio and video quality. VPS servers are often easy to evolve adding CPU, memory or bandwidth depending on the load. The free choice of operating system is also an advantage, because TURN software is usually run under Linux, where it works efficiently. Finally, full control of network parameters (firewalls, ports, NAT) allows fine configuration. Compared to shared hosting, a VPS offers better performance, predictable resources, and higher reliability. For most use cases, a high-performance VPS is therefore more than enough.

Télécharger notre livre blanc

Comment construire une stratégie de marketing digital ?

Le guide indispensable pour promouvoir votre marque en ligne

En savoir plus

Web Marketing

What is a TURN server?

A TURN server is a specialized network server that allows data transmission between two devices when they cannot connect directly due to firewalls or NAT

Web Marketing

STUN server: operation, uses and technique

Today, many Internet connections pass through routers using network address translation (NAT). While this saves IPv4 addresses, it does complicate the establishment of direct connections

Souhaitez vous Booster votre Business?

écrivez-nous et restez en contact