-
Notifications
You must be signed in to change notification settings - Fork 274
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
fix(snownet): replace Allocation
if credentials to relay change
#3590
fix(snownet): replace Allocation
if credentials to relay change
#3590
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
Terraform Cloud Plan Output
|
if existing.is_some() { | ||
tracing::info!(address = %server, "Replaced existing allocation because credentials to TURN server changed"); | ||
} else { | ||
tracing::info!(address = %server, "Added new TURN server"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started a discussion with the str0m maintainers on whether we should call invalidate_candidate
here on all agents and perhaps trigger an ICE restart. it could be that we are just removing the nominated candidate pair and thus need to trigger an ICE restart but at present, invalidate_candidate
doesn't tell me.
Discussion is here: https://str0m.zulipchat.com/#narrow/stream/377845-general/topic/invalidating-candidates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have to block this PR on that though. If a relay restarts, the connections won't work anymore anyway so this is just an optimisation to perhaps rescue some of the connections through an ICE restart instead of having to fail the connection via the tunnel.
Performance Test Results: direct-perfTCP
UDP
|
Performance Test Results: relayed-perfTCP
UDP
|
4bc3909
to
d187bbb
Compare
When a relay restarts, its credentials change but the socket we use to connect to it might not. Because we upsert
Allocation
s within asnownet::Node
based on the socket, such a change is currently not picked up.Instead, we now check whether an existing allocation uses the same credentials and if it doesn't we throw the old one away and use the new one instead.