# Is SFU a right architecture to handle about 500 at a time users?

**URL:** <https://react-native-webrtc.discourse.group/t/is-sfu-a-right-architecture-to-handle-about-500-at-a-time-users/1590>\
**Category:** General\
**Created:** [August 4, 2022, 2:56am UTC](https://react-native-webrtc.discourse.group/t/is-sfu-a-right-architecture-to-handle-about-500-at-a-time-users/1590 "2022-08-04T02:56:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigyankarki](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/bigyankarki/32/635_2.png) [@bigyankarki](https://react-native-webrtc.discourse.group/u/bigyankarki)\
**Post date:** [August 4, 2022, 2:56am UTC](https://react-native-webrtc.discourse.group/t/is-sfu-a-right-architecture-to-handle-about-500-at-a-time-users/1590/1 "2022-08-04T02:56:57Z")

</div>

I am trying to incorporate something like club house/twitter space/Reddit talk into my app. However, I don’t know if I should just stick with the mesh network or use SFU. I understand MCU is a bit overkill, since we are not streaming video, and don’t need any processing on the server’s end. I was wondering if anyone from here has implemented such features, and would be willing to guide. Thank you 🙂

---

<div class="post-metadata">

**Author:** ![jbaudanza](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/jbaudanza/32/387_2.png) [@jbaudanza](https://react-native-webrtc.discourse.group/u/jbaudanza)\
**Post date:** [August 8, 2022, 3:43am UTC](https://react-native-webrtc.discourse.group/t/is-sfu-a-right-architecture-to-handle-about-500-at-a-time-users/1590/2 "2022-08-08T03:43:01Z")

</div>

We’re doing exactly this use case using rn-webrtc and mediasoup as an SFU. It works pretty well.

---

<div class="post-metadata">

**Author:** ![bigyankarki](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/bigyankarki/32/635_2.png) [@bigyankarki](https://react-native-webrtc.discourse.group/u/bigyankarki)\
**Post date:** [August 8, 2022, 7:07am UTC](https://react-native-webrtc.discourse.group/t/is-sfu-a-right-architecture-to-handle-about-500-at-a-time-users/1590/3 "2022-08-08T07:07:45Z")

</div>

Awesome! Thanks for validation. I was wondering how many users are your able to handle, say in case you have just one worker?

---

<div class="post-metadata">

**Author:** ![jbaudanza](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/jbaudanza/32/387_2.png) [@jbaudanza](https://react-native-webrtc.discourse.group/u/jbaudanza)\
**Post date:** [August 8, 2022, 3:18pm UTC](https://react-native-webrtc.discourse.group/t/is-sfu-a-right-architecture-to-handle-about-500-at-a-time-users/1590/4 "2022-08-08T15:18:59Z")

</div>

The general rule of thumb is about 500 consumers per cpu core. Note that I said, “consumers”, not “users”.

A consumer is one user consuming a media stream of another “producer”. So, a room with 500 active users is going to be 500x499 consumers. This would require over 500 CPU cores.

However, it’s kind of abnormal to have a room with 500 people all talking. In reality, most of the producers will be muted, which means the consumers won’t cost any CPU cycles.

Mediasoup is not a plug and play solution. You’ll need to write your own signaling layer, and if you want to scale to multiple CPUs, you’ll need to write the logic to pipe the streams between workers.

Mediasoup has a very active community on discourse and is very well documented. I’d recommend checking it out.

Mediasoup is written in C++, but you control it through a nodejs module. This was a big selling point for me, as I can keep my entire stack in Javascript.
