-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Manage an initial delay before the first mdns query is sent on an interface #3319
Comments
Interesting, I wonder if we can be more a bit more clever here. Would it make sense to retry sending the first packet on a more frequent interval if we don't get a response within X seconds? We'd have to be careful to not spam the network too much so a max number of retries is probably a good idea. |
Indeed this is a good idea. We already have the work done for an initial_delay configuration token (as in identify) and will submit a PR soon. This is sufficient to fix our issue in docker, feel free to duplicate or create another issue for the iterative query at start. |
Peer discovery with mDNS can be very slow, particularly if the first mDNS query is lost. This patch resolves it by adjusting the timer with an adaptive initial interval. We start with a very short timer (500 ms). If a peer is discovered before the end of the timer, then the timer is reset to the normal query interval value (300s), otherwise the timer's value is multiplied by 2 until it reaches the normal query interval value. Related: #3323. Resolves: #3319. Pull-Request: #3975.
Description
Based on identify behaviour, manage an initial delay before the first mdns query is sent on an interface.
Motivation
In a docker environment, the first mdns query can be lost if the interface is not ready yet. As the interval query is by default rather large (5 minutes), using an initial delay before the first mdns query is sent would improve the speed of peers discovery.
Current Implementation
No way to configure an initial delay.
Are you planning to do it yourself in a pull request?
Yes
The text was updated successfully, but these errors were encountered: