---
title: "One for All, All for One: WebRTC Mesh Architecture – WebRTC.ventures"
description: There are a number of strategies available for enabling WebRTC multi-party connections. The most simple choice is Mesh. But only if you don’t need to support more than 3-5 users on the same call and you don’t want a server in the middle. Our DevOps Engineer, Hector Zelaya, explains.
image: https://blog.webrtc.ventures/hubfs/Imported_Blog_Media/WebRTC-Mesh-Architecture.png
---

[Skip to content](https://blog.webrtc.ventures/2021/06/webrtc-mesh-architecture#main-content)

![WebRTC.ventures](https://blog.webrtc.ventures/hubfs/logo-main-light.svg)

- [WebRTC Services](https://webrtc.ventures/webrtc-development-services/)
  
  Show submenu for WebRTC Services 
  
    - [Assess](https://webrtc.ventures/services/assess/)
    - [Build](https://webrtc.ventures/services/build/)
    - [Integrate](https://webrtc.ventures/services/integrate/)
    - [Test](https://webrtc.ventures/services/test/)
    - [Manage](https://webrtc.ventures/services/manage/)
    - [Migrating From Twilio Video](https://webrtc.ventures/twilio-video/)
- Our Partners
  
  Show submenu for Our Partners 
  
    - [Amazon Chime SDK](https://webrtc.ventures/partners/amazon-chime-sdk/)
- Stories of Success
  
  Show submenu for Stories of Success 
  
    - [Remote Video Interpreting Platform with Agent Routing](https://webrtc.ventures/successes/remote-video-translation-platform/)
    - [WebRTC to SIP Gateway for ASL Interpreters](https://webrtc.ventures/successes/webrtc-to-sip-gateway-for-asl-interpreters/)
    - [Audio Listening Device to Improve Surgical Outcomes](https://webrtc.ventures/successes/audio-listening-device-to-improve-surgical-outcomes/)
    - [Albania’s First Telemedicine Platform](https://webrtc.ventures/successes/albanias-first-telemedicine-platform/)
    - [Automated Video Storytelling with the Amazon Chime SDK](https://webrtc.ventures/successes/automated-video-storytelling-with-the-amazon-chime-sdk/)
    - [Large Scale Video Conferencing](https://webrtc.ventures/successes/large-scale-video-conferencing/)
    - [Broadcasting and Webcast Control Room](https://webrtc.ventures/successes/live-video-broadcasting-and-webcast-control-room/)
- WebRTC Resources
  
  Show submenu for WebRTC Resources 
  
    - [WebRTC Live](https://webrtc.ventures/webrtc-live/)
    - [WebRTC Tips](https://www.youtube.com/playlist?list=PLayYqdnyegt3QvxX-Rt6wbFIK8727Z5Oz)
    - [WebRTC.ventures Blog](https://webrtc.ventures/blog/)
    - [Migrating From Twilio Video](https://webrtc.ventures/twilio-video/)
    - [WebRTC.ventures Training Program](https://webrtc.ventures/webrtc-ventures-training-program/)
- [About Us](https://webrtc.ventures/our-team/)
  
  Show submenu for About Us 
  
    - [Blog](https://webrtc.ventures/blog/)
    - [Our Team](https://webrtc.ventures/our-team/)
    - [Jobs](https://webrtc.ventures/jobs/)

Open main navigation

Close main navigation

- [WebRTC Services](https://webrtc.ventures/webrtc-development-services/)
  
  Show submenu for WebRTC Services 
  
    - [Assess](https://webrtc.ventures/services/assess/)
    - [Build](https://webrtc.ventures/services/build/)
    - [Integrate](https://webrtc.ventures/services/integrate/)
    - [Test](https://webrtc.ventures/services/test/)
    - [Manage](https://webrtc.ventures/services/manage/)
    - [Migrating From Twilio Video](https://webrtc.ventures/twilio-video/)
- Our Partners
  
  Show submenu for Our Partners 
  
    - [Amazon Chime SDK](https://webrtc.ventures/partners/amazon-chime-sdk/)
- Stories of Success
  
  Show submenu for Stories of Success 
  
    - [Remote Video Interpreting Platform with Agent Routing](https://webrtc.ventures/successes/remote-video-translation-platform/)
    - [WebRTC to SIP Gateway for ASL Interpreters](https://webrtc.ventures/successes/webrtc-to-sip-gateway-for-asl-interpreters/)
    - [Audio Listening Device to Improve Surgical Outcomes](https://webrtc.ventures/successes/audio-listening-device-to-improve-surgical-outcomes/)
    - [Albania’s First Telemedicine Platform](https://webrtc.ventures/successes/albanias-first-telemedicine-platform/)
    - [Automated Video Storytelling with the Amazon Chime SDK](https://webrtc.ventures/successes/automated-video-storytelling-with-the-amazon-chime-sdk/)
    - [Large Scale Video Conferencing](https://webrtc.ventures/successes/large-scale-video-conferencing/)
    - [Broadcasting and Webcast Control Room](https://webrtc.ventures/successes/live-video-broadcasting-and-webcast-control-room/)
- WebRTC Resources
  
  Show submenu for WebRTC Resources 
  
    - [WebRTC Live](https://webrtc.ventures/webrtc-live/)
    - [WebRTC Tips](https://www.youtube.com/playlist?list=PLayYqdnyegt3QvxX-Rt6wbFIK8727Z5Oz)
    - [WebRTC.ventures Blog](https://webrtc.ventures/blog/)
    - [Migrating From Twilio Video](https://webrtc.ventures/twilio-video/)
    - [WebRTC.ventures Training Program](https://webrtc.ventures/webrtc-ventures-training-program/)
- [About Us](https://webrtc.ventures/our-team/)
  
  Show submenu for About Us 
  
    - [Blog](https://webrtc.ventures/blog/)
    - [Our Team](https://webrtc.ventures/our-team/)
    - [Jobs](https://webrtc.ventures/jobs/)
- [Contact us](https://webrtc.ventures/contact/)

[Contact us](https://webrtc.ventures/contact/)

 Jun 7, 2021 12:00:00 AM

# One for All, All for One: WebRTC Mesh Architecture

[Hector Zelaya](https://blog.webrtc.ventures/author/hector-zelaya)

Share: [linkedin-in icon](http://www.linkedin.com/shareArticle?mini=true&url=https://blog.webrtc.ventures/2021/06/webrtc-mesh-architecture) [X Twitter icon](https://twitter.com/intent/tweet?url=https://blog.webrtc.ventures/2021/06/webrtc-mesh-architecture) [envelope icon](mailto:?body=https://blog.webrtc.ventures/2021/06/webrtc-mesh-architecture)

In its simplest incarnation, [WebRTC](https://webrtc.ventures/2021/01/what-is-webrtc/) allows you to set up a live peer-to-peer connection between two browsers to exchange private video, audio, and data between them. It looks like this:

![](https://blog.webrtc.ventures/hs-fs/hubfs/Imported_Blog_Media/SimpleWebRTCConnectyion.png?width=665&height=77&name=SimpleWebRTCConnectyion.png) ![](https://blog.webrtc.ventures/hs-fs/hubfs/Imported_Blog_Media/SimpleWebRTCConnectyion.png?width=665&height=77&name=SimpleWebRTCConnectyion.png)

 WebRTC in its simplest form

Of course, you and I both know that we also need [signaling and a couple of STUN/TURN](https://webrtc.ventures/2020/12/webrtc-signaling-stun-vs-turn/) servers to do the trick. For now, let’s leave out these components. Just remember that they are still there!

## Let’s make it a party

What would happen if we add another user to the connection? Then another? And another? This is a situation defined as multi-party. With it, the rules of the game change, and believe me, they change a lot.

There are three types of strategies when it comes to how to handle multi-party connections on WebRTC. Mesh, [SFU, and MCU](https://webrtc.ventures/2020/12/webrtc-media-servers-sfus-vs-mcus/). Mesh is the simplest and probably the most obvious solution. Mesh is what we will discuss today. 

## Mesh

For the connection to be possible, each peer that uses the [RTCPeerConnection API](https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection) must create a connection object. This connection object adds all the relevant information, such as video and audio stream, STUN/TURN servers addresses, and handlers for when [Interactive Connectivity Establishment (ICE) candidates](https://www.w3.org/TR/webrtc/#rtciceserver-dictionary) are created or any data is received.

The API then takes care of establishing the connection using all the data that has been passed with a signaling process in the middle.

We then just repeat this process for any number of peers that are added to the call. In other words, we create additional RTCPeerConnection objects for each one.

So, if we add another peer to the diagram described above using this strategy, it will look like this:

![](https://blog.webrtc.ventures/hs-fs/hubfs/Imported_Blog_Media/Screen-Shot-2021-06-06-at-2_21_21-PM.png?width=350&height=233&name=Screen-Shot-2021-06-06-at-2_21_21-PM.png) ![](https://blog.webrtc.ventures/hs-fs/hubfs/Imported_Blog_Media/Screen-Shot-2021-06-06-at-2_21_21-PM.png?width=350&height=233&name=Screen-Shot-2021-06-06-at-2_21_21-PM.png)

You can see that now each peer is maintaining an additional connection by sending media streams and data to two peers, and also receiving the streams and data from each peer. 

## Who invited all these people to my party?

Now, let’s see what this would look like if we add a few more peers.

As the number of users keeps increasing, the processing and bandwidth consumption becomes excessive. This is more visible on mobile devices or in low-end spec computers, where resources are more limited. Also on broadband connections, which are usually tied to contracts where a monthly limit of usage is specified.

![](https://blog.webrtc.ventures/hs-fs/hubfs/Imported_Blog_Media/FiveConnections.png?width=350&height=217&name=FiveConnections.png) ![](https://blog.webrtc.ventures/hs-fs/hubfs/Imported_Blog_Media/FiveConnections.png?width=350&height=217&name=FiveConnections.png)

With five users, each browser needs to maintain four additional connections for sending and receiving streams and data to and from other peers. 

With all this, we can say that Mesh is the simplest way to implement multi-party as it doesn’t require any change on the infrastructure. All the work is done on the browser. The problem is that it only works with a small number of users.

## An alternative strategy

If we want to be able to support more users without any problems, we need to find another strategy – one that allows us to **mix** all the connections created by Mesh or somehow **route** them, in order to avoid the high CPU and bandwidth consumption on the client side. This is where approaches like [MCU (mixing connections) and SFU (routing connections)](https://webrtc.ventures/2020/12/webrtc-media-servers-sfus-vs-mcus/) enter.

**[Building apps with WebRTC](https://webrtc.ventures/2021/01/things-i-wish-i-knew-before-building-my-first-webrtc-app/) is harder than one would imagine. It takes an expert team. If you are interested in working with the best, [contact WebRTC.ventures today](https://webrtc.ventures/contact/)**.

[CPaaS](https://blog.webrtc.ventures/tag/cpaas), [Managed Services](https://blog.webrtc.ventures/tag/managed-services), [Events](https://blog.webrtc.ventures/tag/events), [Video Conferencing](https://blog.webrtc.ventures/tag/video-conferencing), [Real Time Weekly](https://blog.webrtc.ventures/tag/real-time-weekly), [WebRTC Architecture](https://blog.webrtc.ventures/tag/webrtc-architecture), [Broadcasting](https://blog.webrtc.ventures/tag/broadcasting), [Medical](https://blog.webrtc.ventures/tag/medical), [WebRTC Live](https://blog.webrtc.ventures/tag/webrtc-live), [Showcase](https://blog.webrtc.ventures/tag/showcase), [Thoughts](https://blog.webrtc.ventures/tag/thoughts), [Vonage](https://blog.webrtc.ventures/tag/vonage), [Daily](https://blog.webrtc.ventures/tag/daily), [Jobs](https://blog.webrtc.ventures/tag/jobs), [Contact Centers](https://blog.webrtc.ventures/tag/contact-centers), [Telehealth](https://blog.webrtc.ventures/tag/telehealth), [Education](https://blog.webrtc.ventures/tag/education), [Technical](https://blog.webrtc.ventures/tag/technical), [General](https://blog.webrtc.ventures/tag/general), [Story of success](https://blog.webrtc.ventures/tag/story-of-success), [The WebRTC.ventures Blog](https://blog.webrtc.ventures/tag/the-webrtc-ventures-blog), [Testing](https://blog.webrtc.ventures/tag/testing), [Gaming](https://blog.webrtc.ventures/tag/gaming), [DevOps](https://blog.webrtc.ventures/tag/devops), [Symbl.ai](https://blog.webrtc.ventures/tag/symbl-ai)

## Related posts

[![](https://blog.webrtc.ventures/hs-fs/hubfs/Imported_Blog_Media/AllThingsRTC19.jpg?height=200&name=AllThingsRTC19.jpg)](https://blog.webrtc.ventures/2019/06/allthingsrtc-2019)

## [AllThingsRTC 2019](https://blog.webrtc.ventures/2019/06/allthingsrtc-2019)

[Hamza Nasir](https://blog.webrtc.ventures/author/hamza-nasir) 

 Jun 18, 2019 12:00:00 AM

Last week, WebRTC.ventures was invited to the AllThingsRTC 2019 conference hosted by Agora.io in...

[Read more](https://blog.webrtc.ventures/2019/06/allthingsrtc-2019)

[![](https://blog.webrtc.ventures/hs-fs/hubfs/Imported_Blog_Media/WebRTC_venture%E2%80%99s-Alberto-Gonzalez-to-Speak-at-RTE2020.png?height=200&name=WebRTC_venture%E2%80%99s-Alberto-Gonzalez-to-Speak-at-RTE2020.png)](https://blog.webrtc.ventures/2020/10/webrtc-ventures-alberto-gonzalez-to-speak-at-rte2020)

## [WebRTC.ventures' Alberto Gonzalez to Speak at RTE2020](https://blog.webrtc.ventures/2020/10/webrtc-ventures-alberto-gonzalez-to-speak-at-rte2020)

![Picture of Jen Oppenheimer](https://blog.webrtc.ventures/hs-fs/hubfs/Our-Team-Jen.jpg?width=50&name=Our-Team-Jen.jpg) [Jen Oppenheimer](https://blog.webrtc.ventures/author/jen-oppenheimer) 

 Oct 2, 2020 12:00:00 AM

WebRTC.venture’s Senior Software Engineer, Alberto Gonzalez Trastoy, will be among the many...

[Read more](https://blog.webrtc.ventures/2020/10/webrtc-ventures-alberto-gonzalez-to-speak-at-rte2020)

[![](https://blog.webrtc.ventures/hs-fs/hubfs/Imported_Blog_Media/Feb-2024-Team-Talk-.png?height=200&name=Feb-2024-Team-Talk-.png)](https://blog.webrtc.ventures/2024/02/webrtc-ventures-team-talk-february-2024)

## [WebRTC.ventures Team Talk: February 2024](https://blog.webrtc.ventures/2024/02/webrtc-ventures-team-talk-february-2024)

[Hector Zelaya](https://blog.webrtc.ventures/author/hector-zelaya) 

 Feb 29, 2024 12:00:00 AM

Here’s February 2024’s Team Talk, where we ask our dynamic team of WebRTC developers, designers,...

[Read more](https://blog.webrtc.ventures/2024/02/webrtc-ventures-team-talk-february-2024)

### WebRTC.Ventures Services

...

- Assess
- Build
- Integrate
- Test
- Deploy & Manage

### Contact Us

...

**Video should be an opportunity, not a headache.**   
 We’re here to build, integrate, assess and optimize, test, and even deploy and manage your live video application. 

[Contact us](https://blog.webrtc.ventures/2021/06/webrtc-mesh-architecture#contact)

### WebRTC Live

...

 View [past episodes](https://blog.webrtc.ventures/webrtc-live/) of our webinar interview series about the latest webRTC use cases and technical updates. Join our mailing list to learn about upcoming episodes! 

![WebRTC Live](https://blog.webrtc.ventures/hs-fs/hubfs/Template%20Images/widged-bannet.webp?height=90&name=widged-bannet.webp)

![logo-main-light](https://blog.webrtc.ventures/hubfs/logo-main-light.svg "logo-main-light")

We’re one of the few agencies in the world dedicated to WebRTC development. This dedication and experience is why so many people trust us to help bring live video application dreams to life.

 

### Let's get started!

###### **[Contact us today](https://webrtc.ventures/contact/)**

**[info@webrtc.ventures](mailto:info@webrtc.ventures)**

<https://www.linkedin.com/company/webrtc-ventures> <https://www.youtube.com/@WebrtcVentures>

### Join our mailing list

We don't e-mail often (a few times a month max), and it will be worth it when we do! Of course, we respect your privacy and will not share your contact information.

© 2023 WebRTC.ventures, an [AgilityFeat](https://agilityfeat.com/) company / [Privacy Policy](https://webrtc.ventures/privacy-policy//)

```json
{
  "@context" : "https://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Hector Zelaya",
    "url" : "https://blog.webrtc.ventures/author/hector-zelaya"
  },
  "dateModified" : "2024-04-03T18:49:37.204Z",
  "datePublished" : "2021-06-07T04:00:00.000Z",
  "headline" : "One for All, All for One: WebRTC Mesh Architecture – WebRTC.ventures",
  "image" : [ "https://blog.webrtc.ventures/hubfs/Imported_Blog_Media/WebRTC-Mesh-Architecture.png" ],
  "mainEntityOfPage" : {
    "@id" : "https://blog.webrtc.ventures/2021/06/webrtc-mesh-architecture",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://blog.webrtc.ventures/hubfs/logo-main-light.svg"
    }
  }
}
```