calling transport.produce

When I call await transport.produce it takes sometimes about 5 seconds is that a normal case? Is it related to transport.on(“produce”) event which means it will wait until transport.produce() on server is called.

Yes, as the documentation says.

I have this piece of code on server:
var Producer = await producerTransport.produce({ kind, rtpParameters })
callback({ id: });

what makes producerTransport.produce takes time, is it a process of reserving a UDP port, or something else? Does it take more time as the number of producers consumers increase on the server?