How can I link some mediasoup servers together?

I have some servers that work separately and they’re working great.
I’m using a datacenter that can give me maximum 6 CPUs per server. I need more than this for create large group of consumers. How can I link some mediasoup servers together? Or any other solutions?

The documentation

1 Like

Thank you.
Could you please show me where it is or what you call it?

2 Likes

When I have two separate server how can I fill route option of router.pipeToRouter function?
My two router are not located in the same host.
Look at router.pipeToRouter function’s inputs:
pipeToRouter

router.pipeToRouter({ producerId, dataProducerId, router, listenIp });

How can I fill router option of router1 in the server1 with router2 of the other server2.
Thank you.

No, you obviously cannot do that.

1 Like

This is just a special case when both are on the same machine. If they are not on the same machine you need to connect them manually and explicitly, documentation and tests will help you to achieve that.

1 Like

In our tests 2 or 3 CPUs with 3 Ghz is enough to saturate a gbit/link with about 1.600 streams with mediasoup. Don’t know why you think you need more CPUs?

Scaling ist more a thing about cascading, we already now have a soultion for this; our project is https://gomeo.io/

Maybe we can help.

1 Like

Thank you.
I’ve tested mediasoup-demo with this CPU’s detail that can just handle about 50 streams per CPU.
With 4 CPUs I can handle about 200 streams in total.
I have no idea where I was wrong. Maybe my server’s CPU is not good enough?
This is my CPU’s detail:

processor : 7
vendor_id : GenuineIntel
cpu family : 6
model : 58
model name : Intel Xeon E3-12xx v2 (Ivy Bridge, IBRS)
stepping : 9
microcode : 0x1
cpu MHz : 2693.508
cache size : 4096 KB
physical id : 7
siblings : 1
core id : 0
cpu cores : 1
apicid : 7
initial apicid : 7
fpu : yes
fpu_exception : yes
cpuid level : 13

https://gomeo.io/ Nice job.

We use in production per server, virtualized with XEN, 1.200 streams per 4 core system. The limit is the bandwith of ~100 MB/sek not the CPU. We have high resolutions for the webcams by default.

How do you determine that your CPU is a bottleneck?

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Core™ i7-2600 CPU @ 3.40GHz
stepping : 7
microcode : 0x1a
cpu MHz : 3411.602
cache size : 8192 KB
physical id : 0
siblings : 4
core id : 2
cpu cores : 1
apicid : 4
initial apicid : 4
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu de tsc msr pae cx8 apic sep cmov pat clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nopl cpuid pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 popcnt tsc_deadline_timer aes xsave avx hypervisor lahf_lm epb xsaveopt dtherm ida arat pln pts
bugs : null_seg cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips : 6823.22
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

1 Like

I use top command in ubuntu and see every 4 CPUs have about 80-90% usage.
I think you’re CPU is better than mine, isn’t it?
By the way, I’m going to compare your CPU with mine.
Could you help me to find out what’s going on?

We use in production per server

What does it mean? I didn’t get that?

Thank you.

You have much more earlyier all CPUs on 100% than getting performance problems. Tests in my mind/statemens means problems in reality for clients, not just a CPU of 100%.

1 Like

What exactly is unclear? That we are in production?

1 Like

Assume that I download the mediasoup-demo and run it with pm2. Am I in production mode now?
You think I was wrong somewhere?
I’m quite sure my CPUs aren’t better than yours, but they’re not that bad and shouldn’t be so far from your result.
I don’t know where I am wrong.