[dnsdist] Clarification on weight in newServer option

Frank Even lists+powerdns.com at elitists.org
Fri Jul 28 09:13:37 UTC 2017


On Fri, Jul 28, 2017 at 2:04 AM, Remi Gacogne <remi.gacogne at powerdns.com> wrote:
> On 07/28/2017 10:30 AM, Frank Even wrote:
>>> That's not expected, especially since we keep no state to do the
>>> load-balancing. Which policy are you using, wrandom or whashed?
>>
>> Whatever is default.  Is whashed default?  Here's my config (minus the
>> ACLs and setKey), it was simple for testing:
>
> OK, so the default load-balancing policy is leastOutstanding, sending
> queries to the server with the least outstanding queries, then the
> lowest order if there is a tie and finally the lowest latency. This
> policy doesn't use the weight at all, so it explains why your results
> were not conclusive.
>
> Ideally we should implement a weighted consistent hashing policy to deal
> with use cases such as yours. Willy Tarreau suggested it a few months
> ago and was kind enough to explain to me how it's done in HAProxy, but I
> haven't found the time to seriously look into it yet.

Interesting.  Also explains the results I was just about to reply
with, which also seem to not be paying attention to weight after I
remove the ordered node:
> showServers()
#   Name                 Address                       State     Qps
 Qlim Ord Wt    Queries   Drops Drate   Lat Outstanding Pools
0                        10.36.191.74:53                down     0.0
    0   0 1000      19490       1   0.0   0.4           0
1                        10.36.191.75:53                  up     0.0
    0   1 500          7       0   0.0   2.8           0
2                        10.37.77.148:53                  up   320.4
    0   1 50       5426       0   0.0   0.6           0
All                                                            320.0
                  24923       1

I may very well have missed something, but a lot of this isn't clear
to me in the documentation.  I appreciate the clarification though.

SO, if I understand correctly, if I want the weight variable to have
any meaning at all, I need to change the load balancing algorithm,
correct?

What policy would be best suited to using weights?  Is that efficient?
 Or should I just keep it like this, remove weights, and deploy an
ordered policy?

Thanks for your help!
Frank


More information about the dnsdist mailing list