What is the difference between a Routed and a Relayed Session?

Question

What are the differences between the types of sessions you can create with the Vonage Video API?

Applies To

  • Vonage Video API
  • Relayed Sessions
  • Routed Sessions
  • Media Streams

Answer

You can create two types of Vonage Video API sessions: Relayed, which are peer-to-peer, and Routed, which go through Vonage's media server.

Though there are only two types of sessions, there are three different ways that media streams can be sent:

  1. Relayed (Peer-to-Peer) sessions in which the audio and video streams are sent between the users directly.
  2. Relayed (Peer-to-Peer) sessions in which the audio and video streams are sent through Vonage's Relay Servers due to an inability to connect directly to their peer. This happens because one or both the users are located behind a firewall.
  3. Routed sessions are explicitly routed through Vonage's Media Servers. This provides a number of features such as archiving, reduced upload bandwidth in group calls, and Audio-Only Fallback.

Advantages and Limitations of Each Media Stream

Relayed Sessions

Advantages

  • A Relayed session offers the benefit of reduced latency. By having end users directly connect to each other, there are fewer network hops.

Limitations

  • The downside of using a Relayed stream is that you will not be able to take advantage of various rich features that Vonage's Media Servers provide such as archiving, Audio-Only Fallback, as well as reducing upload bandwidth for group calls.

Routed Sessions

Advantages

  • Reduced upload bandwidth - If a publisher is streaming to multiple subscribers, he sends just one stream to the Media Server. The Media Server replicates the streams and sends them out to all subscribers. This way, the publisher's upload bandwidth consumption is reduced.
  • Archiving - Archiving is possible only if a session is routed because it is the Media Server that records the stream. Relayed (peer-to-peer) sessions cannot be archived.
  • Audio-Only Fallback - If the Media Server detects that there are bandwidth limitations on a Subscriber's network, then it automatically switches the subscriber to an Audio-Only mode.

Limitations

  • The main drawback of using a Routed stream is that there might be some latency added versus connecting directly to a peer. In most cases the latency difference will be negligible and it shouldn't be noticeable for video chat scenarios. In certain low-bandwidth situations it can be a factor.
Have more questions? Submit a request