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
Send Spdp directly when we have a new discovered participant #2798
base: master
Are you sure you want to change the base?
Conversation
Directly send sedp when we have a new discovered participant, the original shorten resulted in a 3 second delay with the default settings, see OpenDDS#2787
The small delay is important, since it protects against a flood of outgoing SPDP announcements when a large number of remote participants are discovered sequentially. On a network of 300 participants, all trying to discover each other, we get 300^2 participant announcements if we respond immediately for every incoming SPDP message. This floods the network and causes lots of packet loss / slower discovery times. Perhaps we can have a special case for "the first SPDP announcement we've seen in X seconds (or since startup)" to respond immediately, but we need a safe fallback for the large deployment case. |
I can see your point with 300 participants, but with the small DevGuideExample which writes 100 samples it takes 7 seconds for the test to complete with RTPS, and below 1 second when using the DCPSInfoRepo. @simpsont-oci Maybe we could have a configurable limit for the amount of domain participants under which we do a direct send, above we do a delayed send? Really would like to see that the use case of a simple system has fast discovery. |
I agree with Tim that we need to be smart about sending SPDP to avoid flooding networks. I have an idea on this that I will try to document and circulate. Beyond that, is the delay from SPDP or from SEDP? If SEDP, you may want to try responsive mode (see the dev guide). |
* dds/DCPS/RTPS/Spdp.cpp: * dds/DCPS/RTPS/Spdp.h:
* dds/DCPS/RTPS/Spdp.cpp:
* dds/DCPS/RTPS/Spdp.cpp:
It is SPDP, I also see the same slow discovery on Linux, not always, but there it also happens. |
When a participant receives an SPDP message from a new participant, it should send its own announcement to the new participant quickly but not too quickly lest the network becomes flooded. Let D be an arbitrary delay, e.g., 10 ms. Let N be the number of remote participants discovered by a participant P. Whenever P receives an SPDP message for new remote Q, it picks a random number r in [0,N) and schedules to send a directed (unicast, INFO_DST) announcement to Q at D * r seconds in the future. Assuming that D and N are the same for all participants in the network, then the random delay should smooth out discovery while still making it responsive. |
Any update on improving this slow discovery of participants associated with RTPS mode? |
How many participants are you supporting? What is ResendPeriod set to? |
Less than 20 participants. Where do we have the option of setting up the "ResendPeriod"? As of now it should be in default only I suppose.. |
ResendPeriod is in the rtps_discovery section of the config file. You can check the OpenDDS developer's guide for more info on what this looks like, or try to find an example in one of the test configs. |
Yes, got them. Thanks for the guidance. |
No description provided.