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

SFU Migration support #872

Merged
merged 3 commits into from
Oct 23, 2023
Merged

SFU Migration support #872

merged 3 commits into from
Oct 23, 2023

Conversation

DanielNovak
Copy link
Contributor

@DanielNovak DanielNovak commented Oct 17, 2023

SFU migration support. The SFUs can send a GoAway socket event and in that case we need to migrate from one SFU to other. We spin up a second WS client connection to the new SFU’s signal server and negotiate with the same, already established RTCPeerConnection for the publisher with ICE restart, but create a new Subscriber PeerConnection and close the previous one.

We fall back to full reconnect if anything fails.

How to test locally:

  • start two SFUs locally
  • edit the code to use the local SFU address and switch to the second SFU address when GoAway is received
  • connect two participants (two emulators)
  • kill the first SFU (use Control-C, SIGTERM or SIGINT but not SIGKILL)
  • validate that both participants migrated

TODO:

  • live test with staging SFUs

@DanielNovak DanielNovak force-pushed the sfu_migration branch 7 times, most recently from 5f81a2e to ee39203 Compare October 19, 2023 08:30
@DanielNovak DanielNovak force-pushed the sfu_migration branch 4 times, most recently from d4bb197 to 7b22ea9 Compare October 20, 2023 09:21
@DanielNovak DanielNovak marked this pull request as ready for review October 20, 2023 09:32
@DanielNovak DanielNovak requested a review from a team as a code owner October 20, 2023 09:32
@DanielNovak DanielNovak enabled auto-merge (squash) October 23, 2023 07:36
@DanielNovak DanielNovak merged commit 719b14e into develop Oct 23, 2023
6 checks passed
@DanielNovak DanielNovak deleted the sfu_migration branch October 23, 2023 07:43
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.

1 participant