How to check the port usage

As the documentation says one worker can typically handle over ~500 consumers, so I want to use this setting to expand the number of person in the same room.

I set up an environment as following step:

  1. Create a router on two different workers(each worker has 18 ports.)
  2. Using PipeToRouter to communicate two routers

When 3 person join in each router (totally 6 person), and the 7th person join the room. The system told me that the port is not enough.
As this scenario, the following questions came to my mind

  1. Is the pipeconsumer count as ‘consumer’ ?
  2. How do I observe the port usage in each worker ?
  3. Is the following structure diagram correct ?

Thanks for answering !

Yes 1 consumer and 1 producer, you produce from one router and consume on another router so it 1 producer, 1 consumer is involved in pipetransport on the routers respectively. Check my topic regarding this for clarification:

I am not aware of such thing and you don’t need to observe it, just go with max producers/consumers per worker as per you machine and then estimate the rest from it.

Yes it is ok.

This is subjective to the machine you are using, check this topic for further clarification:

Thanks for your help to understanding the tranport work.

Based on your comment and my situation.

  1. Is Producer, Consumer, pipeProducer and pipeConsumer all cost the CPU resources, but only Producer and Consumer cost the CPU’s ports ?

  2. So if my computer can afford it, the number of people in the meeting can be √65535 persons (almost 255 person) in ideal situation ?

Thanks again !

All of these use CPU resources, and regarding the port it is the transport which occupies port.

Yes you can have n number of person in one meeting if your architecture supports it.

I think you are more concerned about the port usage, and are worried if the ports can get short. No need to worry about it, in latest version of mediasoup you don’t need to specify port range, you just specify one port and everything happens on that, check here: