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

Do not silence parallel links if there are no stable links #1793

Closed
maxsharabayko opened this issue Feb 5, 2021 · 0 comments · Fixed by #1857
Closed

Do not silence parallel links if there are no stable links #1793

maxsharabayko opened this issue Feb 5, 2021 · 0 comments · Fixed by #1857
Assignees
Labels
[core] Area: Changes in SRT library core Priority: High Type: Maintenance Work required to maintain or clean up the code
Milestone

Comments

@maxsharabayko
Copy link
Collaborator

At the moment having the main link fresh activated triggers silencing previously active link before the stability of the fresh-activated link is confirmed.

TODO: Do not silence parallel links if a link selected to become main is still in the activation phase.

Note the activation phase and its purpose is extended a bit in #1775.

Main/Backup Sending Algorithm

1. Qualify Member States

Before sending a packet, all member links are qualified into the following categories:

  • idle links;
  • pending links;
  • active links;
  • unstable links;

Here the runtime stability threshold is used together with the last response time.

2. Sending the Same Packet over Active Links

The same packet is sent over all links qualified as active (including unstable).

Output: a list of parallel links, which is a not-unstable (stable or fresh activated) link with a successful send result.

If sending fails, the link is added to the list of unstable links, but the state of the link itself remains the same.

TODO: Check if Fresh-Activated link should be considered as a parallel link.

3. Add a Packet Being Sent to the Group SND Buffer

This buffer can later be used to retransmit a packet over a newly activated backup link.

4. Check if Backup Link Activation is Needed

Activation is needed if:

  • all active links are unstable;
  • there are no active links, but there is at least one idle link;
  • there is an idle link with the weight higher that the maximum weight among currently active links.

5. [IF] Activate Idle Link

Take the first idle link with the highest weight. Send all buffered packets (see step 3) over this link.. If sending failed, move the link to the list of broken, take another idle link and repeat.

If sending succeeded, the activation is done. The link is added to the list of parallel links (should it?).

6. Check Pending and Broken Sockets

Check if there are pending sockets that failed to connect, and should be removed from the group. Check if there are broken sockets to be removed from the group.

7. Wait for Sending Success

In case of a blocking operation mode, if all sending on previous steps has failed, but there are active links, retry within the sending timeout.

8. Silence Redundant Parallel Links

This step is only performed If there are more than 1 parallel links.

Among the list of parallel links find the one with the highest weight. In case of equal weights, find the one not in activation phase or oldest in activation phase if there are two of such (maybe impossible situation).

@maxsharabayko maxsharabayko added Priority: High Type: Maintenance Work required to maintain or clean up the code [core] Area: Changes in SRT library core labels Feb 5, 2021
@maxsharabayko maxsharabayko added this to the v1.4.3 milestone Feb 5, 2021
@maxsharabayko maxsharabayko self-assigned this Feb 5, 2021
@maxsharabayko maxsharabayko modified the milestones: v1.4.3, v1.4.4 Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[core] Area: Changes in SRT library core Priority: High Type: Maintenance Work required to maintain or clean up the code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant