Understanding Mediasoup 3 (Part III)

In my understanding, “Pipe Router” is used to handle consumer limits on each route. In this scenario, I am trying to limit each route to only have 10 consumers.

  1. I create 2 workers.
  2. I create route 1 on worker 1.
  3. I create route 2 on worker 2.
  4. I create producer 1 (audio) & producer 2 (video) on worker 1.
  5. I create consumer 1 (audio) & consumer 2 (video) on route 2.

If route 2 reaches the consumer limit, I will create a new route to manage the creation of consumers.

my imagine if router reaches the consumer limit

But I get an error, is my understanding incorrect?

The origin router and target router cannot be in the same worker.

Is my architecture design easy to understand? What are your thoughts on it? Do you think it is correct?

I can’t evaluate the attached diagram, but the key checks are: mediasoup does not impose a per-router consumer cap, so enforce your 10-consumer limit in app logic before createConsumer. Also, a pipe transport does not automatically make existing producers consumable. You need a pipeProducer on the source router and a pipeConsumer on the target router, then create normal consumers of that pipeConsumer on the target router. The two routers should be in different workers. If your design assumes otherwise, adjust it.