DEV Community

Md Nasim Reza
Md Nasim Reza

Posted on

Why don't you lag videos even if 20-30 people talk together in Google Meet or Zoom?

Let's understand how this is possible 👇.

1️⃣ Full Mesh Connection: That doesn't work! 🚫
Suppose there are 4 people in the meeting: A, B, C, D.
What happens in Full Mesh?
Everyone sends their videos/audio directly to everyone.
A sends B, C, D; B sends A, C, D... It goes on like this.
The result?
As the user increases, the number of connections increases at an explosive rate (n*(n-1) connection for n people!).
Each device has to encode its own video repeatedly.
The CPU, the RAM, the Internet—everything is under a lot of pressure. The mobile heats up, the battery runs out! 🔥
The lag starts after 4-5 people.
That's why Zoom or Google Meet don't use it. Small 1:1 calls are okay, but group calls are impossible!

2️SFU (Selective Forwarding Unit): The Real Hero! 🦸‍♂️
There is a central media server working here.
How?
Each user uploads their audio/video to the server only once.
The server smartly decides: who will send the stream to, in what quality (HD or low).
Important: The server doesn't encode/decode the video itself—it just forwards!
What is the benefit?
Each has only one upload stream.
Latency is very low.
100+ participants but stable.
Smooth also runs on mobile or low-end devices.
Zoom and Google Meet basically use this SFU architecture—that's what makes them scalable!

3️⃣ STUN, TURN, ICE: THE SILENT WARRIOR 🛡️ OF THE NETWORK
Not everyone is on the same network—some are mobile data, some are behind office WiFi, some are behind firewalls!
They deal with this problem:
STUN: Extracts your public IP. If direct connection is possible, this is the end of it.

TURN: Relays through the server when the direct is blocked (takes a little more resources, but the connection is guaranteed).

ICE: Checks all possible paths and chooses the fastest and most stable route.
Everything is automatic—the user doesn't understand anything!

4️⃣ Not TCP, UDP: Perfect 🚀 for Real-Time
TCP is very reliable—retransmits when packets are lost. But on a video call?
If you lose a packet, the video freezes, freezes.
UDP is different:
If the packet is lost, the flow continues without waiting.
Maintains real-time smoothness.
Video calls need perfect timing, not perfect data!

This is why WebRTC (which is used in Zoom and Meet) runs on UDP.
These techs together make our meetings so easy and smooth! 🤩

Top comments (0)