# How to check the port usage

**URL:** <https://mediasoup.discourse.group/t/how-to-check-the-port-usage/5280>\
**Category:** Deployment & Scalability\
**Created:** [June 9, 2023, 7:40am UTC](https://mediasoup.discourse.group/t/how-to-check-the-port-usage/5280 "2023-06-09T07:40:50Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![zaidiqbal](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/zaidiqbal/32/1498_2.png) [@zaidiqbal](https://mediasoup.discourse.group/u/zaidiqbal)\
**Post date:** [June 9, 2023, 11:27am UTC](https://mediasoup.discourse.group/t/how-to-check-the-port-usage/5280/2 "2023-06-09T11:27:56Z")

</div>

> [@Huai](#):
>
> Is the pipeconsumer count as ‘consumer’ ?

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:

> [@PipeTransport Clarification](https://mediasoup.discourse.group/t/pipetransport-clarification/4686):
>
> Why we need to consume the producer on localPipeTransport? Can’t we do pipeTransport.produce() without it? Also shouldn’t be we doing localPipeTransport.produce() instead of remotePipeTransport.produce()? Like for example incase of routers on different machines we will have only one pipe transport on one machine and for that we will be doing localPipeTransport.produce(). Can someone clarify on this? thanks.

> [@Huai](#):
>
> How do I observe the port usage in each worker ?

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.

> [@Huai](#):
>
> Is the following structure diagram correct ?

Yes it is ok.

> [@Huai](#):
>
> As the documentation says one worker can typically handle over ~500 consumers

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

> [@Maximum number of consumers per worker is 500 w.r.t CPU?](https://mediasoup.discourse.group/t/maximum-number-of-consumers-per-worker-is-500-w-r-t-cpu/4058):
>
> It is mentioned in the official docs here: [mediasoup :: Scalability](https://mediasoup.org/documentation/v3/scalability/) and in discourse topic as well here: [A room with 100 participants](https://mediasoup.discourse.group/t/a-room-with-100-participants/1092) Does this mean that there is hard limit of 500 for a worker or does this mean that if I use high end server then the same worker can handle more than 500 consumers? I am using AWS instance g4dn.8xlarge which is a high end server and it has 32 cores. I am using 1 worker per call so each call has it’s own worker. I am showing max 20 streams to each participant so…

---

_[View the full topic](https://mediasoup.discourse.group/t/how-to-check-the-port-usage/5280)._
