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

[WIP] feature: use vessel name as mdns instanceName #1300

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tkurki
Copy link
Member

@tkurki tkurki commented Apr 6, 2021

https://tools.ietf.org/html/rfc6763#section-4.1.1

For the http service prefix the vessel name with SK.
For the SK service types just use the vessel name.

@tkurki tkurki changed the title feature: use vessel name as mdns serviceName [WIP] feature: use vessel name as mdns serviceName Apr 6, 2021
@tkurki tkurki changed the title [WIP] feature: use vessel name as mdns serviceName [WIP] feature: use vessel name as mdns instanceName Apr 6, 2021
https://tools.ietf.org/html/rfc6763#section-4.1.1

For the http service prefix the vessel name with SK.
For the SK service types just use the vessel name.
@wellenvogel
Copy link

added some comment on #1294

@tkurki
Copy link
Member Author

tkurki commented Apr 7, 2021

Added retries, but haven't tested this with Avahi yet. Could you please give it a try @wellenvogel ?

Add mdns advertisement retry with instance names that
have the retry count appended to the name. Retries
9 times and gives up.
@wellenvogel
Copy link

I have made some tests with avahi daemon.
I guess still not reaching the final goal ;-)

  1. Whenever avahi-daemon restarts a new suffix will be appended to the name. This will for sure confuse any clients. Basically the standard recommends to always reuse the last name that you registered successfully.
    In my code I did it with an extremly simple approach - could be done much better of course.
    If we would like to be as close as possible to the standard we would need to store the last name persistently.
  2. And if I restart avahi-daemon > MAX_RETRIES ... - the mdns entry will disappear. I guess max retries should only be effective for errors due to name clashes. All the async errors should simply start a re-register without any name change.
    Maybe this needs a second thought when using the internal mdns implementation. Did not really check this too much.
  3. Small remark for using the shipname:
    On one hand side this is cool - but: If you start from scratch you will have the hostname first. And once you change your shipname - the names will (surprisingly?) change... At least I guess this needs some clear documentation.

@tkurki tkurki added the feature label May 27, 2022
@tkurki
Copy link
Member Author

tkurki commented Dec 6, 2022

#1477 introduces the ability to store "serverstate" properties and the mdns naming status could go there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants