WebRTC Advanced-Overview-one: WebRTC The comparison and analysis of networking technology of conference

Source: Internet
Author: User
first, the network topology structureWEBRTC can also be used as multiparty calls, such as video conferencing, in addition to peer-to-peer communication.
When it comes to multi-party calls, we need to select a schema for our application.
This is a very important decision, because how to organize users is related to the scale of the conference system.

Corresponding to WEBRTC, there are two common network topologies:
Mesh networks and star-shaped networks

1.1 Mesh NetworkThe most common topology is the mesh network,
In this kind of network, each side sends the data to the other side of the network.
In a fully connected mesh network, there will be a "n" (N-1) connection, where N is the number of ends.
For example, an all-Unicom network of 4 users will have 12 connections.

Figure 2. A full-unicom mesh network of 4 users

In this kind of network, the service side is not needed, so this is a very cheap application choice.
The drawback is that, as the number of participants in the network increases, more bandwidth and CPU load is required.
Therefore, such an architecture is not suitable for larger networks.

1.2 Star-shaped networkIn a star-shaped network architecture, we can choose a very common network hub,
Its role is to receive all the data from the Conference caller, and then send an appropriate combination stream to each side.

Unlike mesh networks, star-like networks can easily join new users or leave the network.
Furthermore, a star-shaped network can mix separate streams and distribute the mix stream.
In this way, for each end of the network, only a single stream needs to be transmitted, which greatly saves bandwidth and CPU,
Just a lot of processing work has migrated to the hub (often referred to as the Conference bridge).

The downside is that it relies on the hub, and if the hub goes down, the entire network doesn't work.
For it, the number of ports that can be joined to the network and the number of shared streams that can be processed depends on the hub's capabilities.

FIG3 Star network topological structure diagram

1.3 MCUMultipoint Control Unit (MCU) is similar to a star-like network, and in the analysis behind us,
Using an optimized server, it can handle real-time data very well.
However, the cost of the MCU is high and it increases the overall cost of the network.

Comparison of mesh networks and star-like networksThis paper compares the network and CPU load of mesh network and star-shaped network to the growth of users.

2.1 test MethodsA mesh network can be composed of two computers connected directly to each other.
I found out that https://appear.in/had a way of constructing a mesh network,
In it there is a group chat app that can implement a browser-based WEBRTC API multiparty conferencing Call,
There is no need to install or register an account.
I created a room number in it so that whenever a user connects to this room,
The browser asks the user permission to get the camera and mic first. The user can join the room after selecting the confirmation.

In the test, I used only the sound stream and used the play MP3 instead of the speech sound.
CPU load test I'm using Task Manager.
Https://appear.in/only allows up to 8 users in the same room.

Star Network I used the scheme is https://meet.jit.si/, it built the WebRTC bridge.

2.2 ResultsMesh networks consume a large amount of CPU compared to a star-like network.
In fact, I did not reach 8 user connections in the mesh network test, and the CPU was up to the maximum load.
The star-shaped network has no problem at all and can add more people.

The following figure shows the CPU load and network load for both networks.

Figure 4 CPU Load

Figure 5 Network Load

In the first picture, the Star network always has only 10~20% CPU load.
In the two picture, there is a significant increase in bandwidth when users in the network network grow to more than 4.

2.3 AnalysisIn comparison, star-shaped networks have better scalability.
When the mesh network has more than 7 users in the same room, it can cause a sharp increase in CPU load.

and mesh networks can work well in 2-4 of users in the same room,
But after that, the user's growth will cause the delay to grow quickly.
This is mainly because, in a mesh network, every user in the room sends and receives data.
As a result, the more users, the faster the bandwidth grows.
And because browsers add more coding and decoding work as the user grows,
This results in increased CPU load.

In a star-shaped network, however, its load is borne by the hub, so there is no impact on the CPU and bandwidth load on the native side.
So that more users can be supported to join the room.

Original:
"Comparing different network topologies for WebRTC conferencing"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.