What's the max allocation num at the same time on the server ?

58 views
Skip to first unread message

陈新隆

unread,
Jun 17, 2019, 6:45:42 AM6/17/19
to TURN Server (Open-Source project)
Hi, according to the content mentioned in [rfc5766 page-7](https://tools.ietf.org/html/rfc5766#page-7) :  

Each allocation on the server belongs to a single client and has
   exactly one relayed transport address that is used only by that
   allocation.  Thus, when a packet arrives at a relayed transport
   address on the server, the server knows for which client the data is
   intended.

The client may have multiple allocations on a server at the same
   time.

Let's set the turnserver.conf as : 
min-port=49152
max-port=65535

total-quota=20000



Since one relayed transport address is used only by that allocation , then the max allocation num at the same time is the max relayed transport address num which is : 

65535 - 49152 = 16383 

And "client may have multiple allocations on a server at the same time", so say turn client has 3 allocations at the same time, than the max client num at the same time turnserver can serve is  :  

(65535 - 49152)/3 = 5461

If the allocate request carry the `EVEN-PORT` attribute,  then the result is a half of 5461.

So, 

1. Am I correct in the calculation above ? Please correct me if I'm wrong.
2. If I did this calculation right, then the `total-quota` in turnserver.conf is always less than/equals to `maxport - minport` even I set it as big enough ?  

Reply all
Reply to author
Forward
0 new messages