Skip to main content

Metered Global Cloud SFU Overview

What is Metered Global Cloud SFU?

With the Metered Global SFU you can build any type of real-time application that involves audio/video and even data-channels for any use-case.

Metered Global SFU is the like a PUB-SUB Service for Audio, Video and Data-Channels. You can publish the media to the SFU using plain WebRTC API and HTTP without using any 3rd Party SDK.

Users are automatically connected to the nearest SFU based on their geographical location, ensuring the lowest possible latency. Unlike traditional Video API/SDK product, there is no need to pre-select a location or region. The global distribution of SFUs means that users can be located anywhere in the world and still experience optimal performance through automatic routing to the closest SFU.

Additionally, users can publish and subscribe to streams without geographical restrictions. For example, if a user is broadcasting a stream from New York City, another user in Seoul can subscribe to it. Both users will connect to the SFUs closest to their locations, with the media stream efficiently routed via high-speed inter-SFU links.

Connection Flow

The typical connection flow to the SFU looks like:

  1. Establishing a Connection:

    • Create a peerConnection using the native WebRTC API.
    • Send the local SDP (Session Description Protocol) offer to the SFU via an HTTP API request.
    • Receive the SFU's remote SDP in response and set it on the peerConnection.
    • The connection is now established.
  2. Subscribing to a Track:

    • Send an HTTP request to the SFU with the trackId and the remoteSessionId of the track you wish to subscribe to.
    • Receive the remote SDP corresponding to the track in response.
    • Set the received SDP on your peerConnection. The native ontrack event will trigger, delivering the remote track.
  3. Publishing a Track:

    • Add the desired media track to the peerConnection.
    • Generate the local SDP offer and send it to the SFU via an HTTP request.
    • Receive the SFU's remote SDP and set it on your peerConnection.

Advantages of Metered Global Cloud SFU Over WebRTC API/SDK or Peer-to-Peer WebRTC

Metered Global Cloud SFU offers significant advantages over traditional peer-to-peer WebRTC setups and WebRTC API/SDK products.

Scalability

In a typical peer-to-peer webrtc setup, each participant must maintain a direct connection with all the other participants. This quickly become unsustainable to forward the stream to all the other participants as the number of participants increases.

Because for e.g there are 4 participants in the meeting each participant would have to forward the stream to 3 other participants in the meeting. Now as the number of participants increases each participant has to forward to stream to all the other participants, this quickly becomes unsustainable.

In Metered Global Cloud SFU, all the participants send the video stream to the Metered Global Cloud SFU and download the stream from the SFU, so if there are 4 participants in meeting each participant has to send only their own video stream to the SFU and not forward the stream to rest of the 3 participants.

You can scale this even further and build a live-streaming application, where the broadcaster will upload the video stream to the Metered Global SFU and the Metered Global SFU will forward the stream to thousands to viewers, this was not possible with peer-to-peer WebRTC.

Platform Independent

Many WebRTC API/SDK products requires installing their specialized SDK, which not always support all platforms. Installing the 3rd party SDK also increases the number of dependencies.

The Metered Global Cloud SFU eliminates the need for specialized SDK as it leverages the native WebRTC API + HTTP REST APIs. The approach provides greater flexibility allowing the developers to leverage the standard web technologies rather than investing in learning a specialized SDK.

As as result applications can developed for web browsers, mobile device, IOT devices, desktop application without worry about compatibility using the native WebRTC API available for that platform.

Flexible Pub-Sub Model

Many WebRTC services use concept of Rooms, where there is a participant and the participant joins a room, and there is a limit on the number of participants who can join the room as so on.

Metered Global Cloud SFU operates on a Publish-Subscribe model, there is no concept of Rooms, there are just sessions, each session represents a connection the the Metered Global Cloud SFU, and the session can publish audio, video or data-channels to the SFU, and the session could also subscribe to the published audio, video or data-channels from other sessions.

The model allows for highly flexible approach and doesn't impose any limit on the number of participants in a room or rigid session structures.

This allows developers to create applications tailored to a wide range of use-cases from remote monitoring of robotic cameras, linux based IOT Cameras, to large-case real-time livestreaming, video conferencing or AI application.

The absence of predefined rooms allows for dynamic and scalable application designs, making it easy to implement complex scenarios, such as multi-device streaming.

Cost Efficiency

Cost is an important factor when choosing a communications infrastructure provider, especially for applications with high usage volumes. Many Video API/SDK providers charge per minute, which can become expensive in continuous streaming scenarios like surveillance, remote monitoring, or broadcasting.

The Metered Global Cloud SFU offers a more cost-effective billing model, charging based on the amount of data transferred (billed by GB) rather than the duration of streaming.

Also, only the data fetched from the Metered Servers to the end-users is billed while the data sent to the Metered Server is not charged.

This model provides significant cost savings, particularly for use cases where media streams are continuously uploaded but infrequently accessed by viewers.

For example, surveillance systems can stream data to the SFU continuously, but costs are only incurred when someone views the stream.

Global SFU Network

In traditional Video API/SDK you have to manually select a region and all your connections will be restricted to the data-center in that region, causing increased latency for users using the your product who are outside that region.

Metered Global Cloud SFU offers a globally distributed network of SFUs, this architecture allows the user to automatically connect to the SFU nearest to the user thus significantly reducing the latency and enhancing the real-time experience for all participants.

The users from multiple regions can consume streams from any other region and the streams is provided to the user through high speed inter-sfu link.

      +----------+                                                  +----------+
| User A | | User B |
+----------+ +----------+
| |
| |
| |
| |
v v
+----------------+ High Speed Inter-SFU Link +----------------+
| SFU in London | <--------------------------------------> | SFU in New York |
+----------------+ +----------------+