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

bonding with rendez-vous mode #2158

Closed
walido2023 opened this issue Oct 12, 2021 · 12 comments
Closed

bonding with rendez-vous mode #2158

walido2023 opened this issue Oct 12, 2021 · 12 comments
Labels
Type: Question Questions or things that require clarification

Comments

@walido2023
Copy link

Hi,
I am trying to implement the bonding feature for the possible SRT modes.
The documentation provided with the library has an introduction and some examples for the caller-listener couple, not for the rendez-vous mode.
I'm wondering if the bonding feature is already supported for rendez-vous mode?
If so, do you have an example to share with me?
Thank you

@walido2023 walido2023 added the Type: Question Questions or things that require clarification label Oct 12, 2021
@maxsharabayko
Copy link
Collaborator

Hi @kawi2006
The rendezvous connection mode is not supported for SRT socket groups.

@walido2023
Copy link
Author

Hi @maxsharabayko
Thank you for your quick feedback.
I have another question please:
For the caller-listener connection, in case when I have two SRT caller sockets which are sending the same payload to the server using bonding system.
Is it possible on the server side to create two sockets listener allowing to receive the same stream in bonding?
The idea is to make each SRT socket listen for a specific and independent network interface and manage received data in the bonding system.
Thank you.

@maxsharabayko
Copy link
Collaborator

For the caller-listener connection, in case when I have two SRT caller sockets which are sending the same payload to the server using bonding system.
Is it possible on the server-side to create two sockets listener allowing to receive the same stream in bonding?

Yes, it is possible. Just create several listeners, bind each to the required UDP port. And set SRT_GROUPCONNECT to 1.
One listener can also accept several connections of a single socket group.

@walido2023
Copy link
Author

OK, but I got this message when two listener is used like a group to receive the same payload
"No room to store incoming packet: offset=51234 avail=0 ack.seq=734613160 pkt.seq=734664394 rcv-remain=8191 drift=0"
Do you have an idea please?

@walido2023
Copy link
Author

image

This diagram may explain what I'm going to do.

@maxsharabayko
Copy link
Collaborator

Could you define which SRT version do you use? Seems like it is not v1.4.4, right?

Please also see these configuration guidelines.

@walido2023
Copy link
Author

I'm using v1.4.3.
This feature is available from v1.4.4?

@maxsharabayko
Copy link
Collaborator

This feature is available from v1.4.4?

SRT v1.4.3 also supports this feature.
Just v1.4.4 has certain fixes for socket groups, and it makes sense to exclude them by using v1.4.4.
Also, the "no room to store..." log message has been improved (PR #1909).
It might be worth checking srt-xtransmit testing app, as it supports your use case.

@walido2023
Copy link
Author

walido2023 commented Oct 13, 2021

Thank you, the example helped me to find the root-cause.

Another question please: by migrating from SRT v1.3 to v1.4.3 the SRTO_MAXBW option no longer wants to be set.
flag = 0; //0=auto
if (srt_setsockopt(socket, 0, SRTO_MAXBW, &flag, sizeof(flag)) == -1) {
printf("srt_setsockopt(R) [SRTO_MAXBW] error ! [%s]\n", srt_getlasterror_str());
return -1;
}
it returns always -1
MESSAGE : srt_setsockopt(R) [SRTO_MAXBW] error ! [Operation not supported: Bad parameters]

Do you know what changes done between versions may impact this option?
Thank you

@maxsharabayko
Copy link
Collaborator

The flag variable must be of int64_t. Please ensure it is in your case. I don't see the type in your example.

@walido2023
Copy link
Author

Yes it was the type :D
Thank you!

@ethouris
Copy link
Collaborator

Just to mention a general rule of bonding with using multiple listener sockets:

If you create a group (at the "caller side") and try to make multiple connections in the group, all of which will really be resolved into the same machine and application (if not, every next connection will fail), on the listener side the "accepted sockets" will also join the same mirror group upon reporting, no matter from which listener the sockets were extracted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Question Questions or things that require clarification
Projects
None yet
Development

No branches or pull requests

3 participants