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

Client: Add support for all entries in a Round Robin set as broker candidates #81

Open
pmelange opened this issue Aug 1, 2018 · 7 comments

Comments

@pmelange
Copy link
Contributor

pmelange commented Aug 1, 2018

It would be really useful to have all available endpoints with a single given Round Robin DNS entry as possible broker candidates. This simplifies a lot on the client side while allowing the broker side to add additional servers.

@kaechele
Copy link
Contributor

What you're suggesting is to read all entries in a RRset and then add every one of the items to the list of broker candidates, right?
Because that would be something different than Round Robin DNS, which the tunneldigger client already does.

@pmelange
Copy link
Contributor Author

Yes, exactly.

@pmelange pmelange changed the title Client: Add support for Round Robin DNS Client: Add support for all entries in a Round Robin set as broker candidates Oct 26, 2018
@kaechele
Copy link
Contributor

kaechele commented Nov 6, 2018

Okay, looking at it, I think it can be done.

I found a corner case that would need to be checked:
Currently, there is a defined maximum of 10 brokers that the client will handle.
Given a situation in which a round-robin DNS query yields more than 10 brokers. What should the defined behaviour be?
Also we'd need to think about the case where more than one DNS name was given as a parameter and the collective number of responses is > 10. Do we just choose the first 10 or do we balance between the given DNS responses?

@pmelange
Copy link
Contributor Author

pmelange commented Nov 6, 2018

It also depends on what type of broker selection is being used. I use 'usage' based.

With 'usage' and 'random' , I think it would make more sense to balance between the given dns entries.

But if the 'first' broker selection is used, then definitely go through all the dns entries of the first hostname before the others.

The limit of 10 brokers is a separate issue. In my personal situation it does not have an impact. But maybe it would be nice to allow setting MAX_BROKERS at compile time.

@SvenRoederer
Copy link

I had a look into the code as I was interested in checking for support of the SRV-RR.
SRV-RRs might give some advantages:

  • you can define priorities --> e.g. 10 hosts with equal prio to shuffle around
  • you can define weighting inside a priority --> not sure if this can be useful
  • each referenced host can define it's own port --> flexible configuration than having to use the same port on all brokers in the RoundRobin-list

I think the SRV-RR lookup should be supplied with a separate parameter which can not be combined with "-b".

@pmelange
Copy link
Contributor Author

pmelange commented Mar 1, 2019

The wikipedia link for "SRV record" is https://en.wikipedia.org/wiki/SRV_record

@pmelange
Copy link
Contributor Author

I have recently modified the Freifunk tunneldigger init and hotplug scripts to be able to use SRV records. The changes can be seen here freifunk-berlin/falter-packages@29943b0

Instead of having tunneldigger itself get an SRV record, the init and horplug scripts get the SRV record and add them each as single "-b" options.

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

No branches or pull requests

4 participants