Skip to content

cmd/derper: serve STUN responses out of a separate process - #8435

Closed
crawshaw wants to merge 1 commit into
mainfrom
crawshaw/stunchild
Closed

crawshaw wants to merge 1 commit into
mainfrom
crawshaw/stunchild

Conversation

@crawshaw

@crawshaw crawshaw commented Jun 25, 2023 •

Copy link
Copy Markdown
Contributor

Updates #8434

Two things to consider before merging this PR:

  • the effect on monitoring. I believe monitoring derper CPU will now only report the STUN CPU use. What is the best way to tell our monitoring about the subprocess? (Can monitoring monitor a process group?)
  • now that STUN is higher CPU priority it may be worth adding a per-remoteaddr rate limiter

@bradfitz

bradfitz commented Jun 25, 2023 •

Copy link
Copy Markdown
Member

I thought the plan was to run STUN on its own servers in a region?

@crawshaw
crawshaw force-pushed the crawshaw/stunchild branch from 322c3d0 to f6e6569 Compare June 25, 2023 14:07
@crawshaw

Copy link
Copy Markdown
Contributor Author

I'm not up to date on plans (if there was a meeting, I haven't found the notes to read). This seemed really easy until I was done and got to thinking about monitoring.

@bradfitz

Copy link
Copy Markdown
Member

cc @valscale @raggi

Comment thread cmd/derper/derper.go
if f.Name == "stun" {
return
}
args = append(args, "-"+f.Name, f.Value.String())

@creachadair creachadair Jun 25, 2023 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we have (or add) any Boolean flags, I think we will want -name=value format as the separated values will not be read properly and will terminate option parsing.

raggi added a commit that referenced this pull request Jan 5, 2024
If a derper is loaded for any reason, it can add spurious additional
runtime to stun responses producing latency estimation errors in the
clients. For some deployment scenarios simply running the stun responder
as a subprocess is a simple solution to substantially reduce this
problem.

Fixes #8434
Closes #8435

Signed-off-by: James Tucker <[email protected]>
raggi added a commit that referenced this pull request Jan 5, 2024
If a derper is loaded for any reason, it can add spurious additional
runtime to stun responses producing latency estimation errors in the
clients. For some deployment scenarios simply running the stun responder
as a subprocess is a simple solution to substantially reduce this
problem.

Fixes #8434
Closes #8435

Signed-off-by: James Tucker <[email protected]>
raggi added a commit that referenced this pull request Jan 5, 2024
Add a standalone server for STUN that can be hosted independently of the
derper, and factor that back into the derper.

Fixes #8434
Closes #8435
Closes #10745

Signed-off-by: James Tucker <[email protected]>
raggi added a commit that referenced this pull request Jan 8, 2024
Add a standalone server for STUN that can be hosted independently of the
derper, and factor that back into the derper.

Fixes #8434
Closes #8435
Closes #10745

Signed-off-by: James Tucker <[email protected]>
raggi added a commit that referenced this pull request Jan 8, 2024
Add a standalone server for STUN that can be hosted independently of the
derper, and factor that back into the derper.

Fixes #8434
Closes #8435
Closes #10745

Signed-off-by: James Tucker <[email protected]>
raggi added a commit that referenced this pull request Jan 8, 2024
Add a standalone server for STUN that can be hosted independently of the
derper, and factor that back into the derper.

Fixes #8434
Closes #8435
Closes #10745

Signed-off-by: James Tucker <[email protected]>
raggi added a commit that referenced this pull request Jan 8, 2024
Add a standalone server for STUN that can be hosted independently of the
derper, and factor that back into the derper.

Fixes #8434
Closes #8435
Closes #10745

Signed-off-by: James Tucker <[email protected]>
raggi added a commit that referenced this pull request Jan 8, 2024
Add a standalone server for STUN that can be hosted independently of the
derper, and factor that back into the derper.

Fixes #8434
Closes #8435
Closes #10745

Signed-off-by: James Tucker <[email protected]>
raggi added a commit that referenced this pull request Jan 8, 2024
Add a standalone server for STUN that can be hosted independently of the
derper, and factor that back into the derper.

Fixes #8434
Closes #8435
Closes #10745

Signed-off-by: James Tucker <[email protected]>
raggi added a commit that referenced this pull request Jan 8, 2024
Add a standalone server for STUN that can be hosted independently of the
derper, and factor that back into the derper.

Fixes #8434
Closes #8435
Closes #10745

Signed-off-by: James Tucker <[email protected]>
@raggi raggi closed this in #10757 Jan 9, 2024
@raggi raggi closed this in 953fa80 Jan 9, 2024
kari-ts pushed a commit that referenced this pull request Jan 12, 2024
Add a standalone server for STUN that can be hosted independently of the
derper, and factor that back into the derper.

Fixes #8434
Closes #8435
Closes #10745

Signed-off-by: James Tucker <[email protected]>
Asutorufa pushed a commit to Asutorufa/tailscale that referenced this pull request Jan 19, 2024
Add a standalone server for STUN that can be hosted independently of the
derper, and factor that back into the derper.

Fixes tailscale#8434
Closes tailscale#8435
Closes tailscale#10745

Signed-off-by: James Tucker <[email protected]>
chen8945 pushed a commit to Ckid-Home/tailscale that referenced this pull request Jul 31, 2024
Add a standalone server for STUN that can be hosted independently of the
derper, and factor that back into the derper.

Fixes tailscale#8434
Closes tailscale#8435
Closes tailscale#10745

Signed-off-by: James Tucker <[email protected]>
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

Successfully merging this pull request may close these issues.

3 participants