Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
chenxinlong opened this issue Jun 16, 2019 · 3 comments
Closed

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

chenxinlong opened this issue Jun 16, 2019 · 3 comments

Comments

@chenxinlong
Copy link

chenxinlong commented Jun 16, 2019

Hi, according to the content mentioned in 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, then 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 ?
@chenxinlong
Copy link
Author

Hi, any progress here?

@eakraly
Copy link
Collaborator

eakraly commented Oct 17, 2022

Hi @chenxinlong ! This question is 3 years old so answering and closing.

Your calculations seem to be correct.
min-port and max-port define the allowed range of ports to be used in case when turnserver runs in virtualized environments or OS that need fine tuning of those.

While this also defines max amount of allocations they are not directly related.
TBH I do not know how will it look like when your quota is higher than port range allows it AND you actually go above it.

@eakraly eakraly closed this as completed Oct 17, 2022
@chenxinlong
Copy link
Author

Thx for the reply. Also, so happy to see this project coming alive again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants