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

Roadmap: Connection Bonding #1120

Open
25 of 33 tasks
maxsharabayko opened this issue Feb 6, 2020 · 9 comments
Open
25 of 33 tasks

Roadmap: Connection Bonding #1120

maxsharabayko opened this issue Feb 6, 2020 · 9 comments
Assignees
Labels
[core] Area: Changes in SRT library core Type: Enhancement Indicates new feature requests
Milestone

Comments

@maxsharabayko
Copy link
Collaborator

maxsharabayko commented Feb 6, 2020

Listener Callback: Group Extension (API)

Existing listener callback does not provide fields to pass group-related data.
Another function is needed.

Rejection Reason Enahancements (API)

Make it possible for an application to set a specific reason for rejecting a connection from a listener callback.

Group Statistics

Reusing srt_bistats function for SRT socket group.

  • srt_bistats function for groups: Added group support for stats probing. PR Added group support for stats probing #1303.

  • srt_bistats function for groups: reuse pktSentTotal, pktSndLossTotal etc. as a sum of corresponding values of the individual socket in a group.

  • Decide on pktRcvDiscardTotal for groups

Group Status

Uncategorized

Balancing

  • 12. Load balancing implementation

  • 13. Load balancing documentation

Completed work
  • The CUDTGroup class
  • Associated symbols the class depends on
  • Support functions in CUDT class for creation/deletion and hookup
  • (transmission functions temporarily deleted)
  • Handling group ID in existing API functions
  • Extra API functions dedicated for groups
  • Passing and recognizing the group in the handshake
  • Support functions in other classes to handle group synchronization
  • Doing specific actions as required for the group in existing internals
  • The receiving function, universal for broadcast and backup type
  • The sending function for broadcast type only.
  • Handling the special syntax for groupwise connections
  • Handling the groups internally in the application
@maxsharabayko maxsharabayko added Type: Enhancement Indicates new feature requests [core] Area: Changes in SRT library core labels Feb 6, 2020
@maxsharabayko maxsharabayko added this to the v1.5.0 milestone Feb 6, 2020
@maxsharabayko maxsharabayko changed the title [LIST] Network Bonding Part 1: Socket Group API [LIST] Roadmap for Network Bonding Feb 6, 2020
@maxsharabayko maxsharabayko pinned this issue Feb 6, 2020
@maxsharabayko maxsharabayko changed the title [LIST] Roadmap for Network Bonding Roadmap: Network Bonding Feb 6, 2020
@Llorx
Copy link
Contributor

Llorx commented Feb 28, 2020

Hi, I have one question.

How will SRT_GTYPE_BALANCING work? will it just roundrobin or will have some kind of congestion control/packet loss count to send just the amount of packets that can handle?

EDIT: Really great work. Keep it up.

@maxsharabayko
Copy link
Collaborator Author

Hi @Llorx
Thanks for your interest in this feature.
The first implementation of the balancing mode will likely be simple, maybe relying on some heuristics.
The goal is to have an extensible module to allow people to add custom algorithms. In a way similar to how Congestion Control and Packet Filter modules are implemented.

@ethouris
Copy link
Collaborator

ethouris commented Mar 2, 2020

You can take a look at my development branch dev-groups-external-msgsync.

As I know that the method of selecting the link can be based on various parameters, I have provided a framework for adding various possible balancing algorithms. Currently there are two provided:

  • linkSelect_plain: simple round-robin with no parameters tracked
  • linkSelect_window: the selector tracks the cost of sending of a packet over particular link by checking the flight window on all links and deciding the link load basing on it. Every sending operation is considered as adding a load on this link, and for next sending the least currently loaded link is selected. This algorithm is provided, but didn't undergo yet any stress testing and will likely need to be largely improved.

@Llorx
Copy link
Contributor

Llorx commented Mar 5, 2020

Nice @ethouris. linkSelect_window seems pretty cool.

Hm @maxsharabayko, I see a problem with the modular thingy. Most of the users will benefit from SRT by using third-party software that has SRT already implemented, so is impossible to create your own module as you need to compile your own SRT with that module "inserted". One example is vMix.

Will be difficult to release it with some cool modules already built-in? so third-party software can benefit from it, as I don't expect them to build some cool modules on their own.

Or maybe add some kind of "dll" thingy too. I don't know.

Also, there are some MP-TCP congestion control algorithms that maybe you can benefit of.

By the way, I know that this is a long-way until we have something cool hehe. Nice work you have there.

@mbakholdina mbakholdina changed the title Roadmap: Network Bonding Roadmap: Connection Bonding Apr 21, 2020
@maxsharabayko maxsharabayko unpinned this issue Sep 14, 2020
@Llorx
Copy link
Contributor

Llorx commented Sep 16, 2020

Hi, sorry for bothering. Just to know, are you already working on something regarding 12. Load balancing implementation? You have way more experience and I'll love to see what you come with before I start fiddling with it.

EDIT: Oh, I forgot about @ethouris dev-groups-external-msgsync branch! Going to play with it a bit :-P

@ethouris
Copy link
Collaborator

Just note that we decided to put it aside because it cannot support redundancy protection. Simply, if you break one link, you'll get packet drops.

@Llorx
Copy link
Contributor

Llorx commented Sep 16, 2020

Oh. Just fiddled a bit @ethouris. Copied your code to the latest master and I'm trying to make it work.

When a link goes down, is not possible to put its non-acked packets in the queue again (or resend them through the group or whatever)? I have the left arm in a cast so is really hard for me these days to work fluidly, will try my best.

@wangyoucao577
Copy link
Contributor

Excellent feature!
By contrast Broadcast and Main/Backup, I believe that the balnacing mode will be more and extermely useful, as long as the link selection(control data sent on each link) and ACK(may across another channel) carefully handled. FEC and interleaving will be helpful, too, on the other hand. It depends how these algorithms integrated together in implementation.

Oh. Just fiddled a bit @ethouris. Copied your code to the latest master and I'm trying to make it work.

When a link goes down, is not possible to put its non-acked packets in the queue again (or resend them through the group or whatever)? I have the left arm in a cast so is really hard for me these days to work fluidly, will try my best.

It definitely possible and useful! I have done similar things before that worked well, but details need to be carefully handled to resend in time but not too early.

I can't find dev-groups-external-msgsync anymore. How's progress of this feature(balance mode)?

@ethouris
Copy link
Collaborator

This is the branch on my own clone of the repository, not in the main repository.

I don't know how "mergeable" it is now against the current code, I've not been updating it at all since the decision was to put this feature aside.

This implementation had a disadvantage that "zipping" was only possible basing on message numbers, so packets lost due to a broken link are lost forever. This part will definitely have to be rewritten in any new implementation.

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 Type: Enhancement Indicates new feature requests
Projects
None yet
Development

No branches or pull requests

4 participants