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

rec: Use a bounded load-balancing algo to distribute queries #7507

Merged
merged 5 commits into from
Apr 1, 2019

Conversation

rgacogne
Copy link
Member

Short description

If pdns-distributes-queries is set and this setting is set to another value than 0, the distributor thread will use a bounded load-balancing algorithm while distributing queries to worker threads, making sure that no thread is assigned more queries than distribution-load-factor times the average number of queries currently processed by all the workers.
For example, with a value of 1.25, no server should get more than 125 % of the average load. This helps making sure that all the workers have roughly the same share of queries, even if the incoming traffic is very skewed, with a majority of requests asking for the same qname.

Checklist

I have:

  • read the CONTRIBUTING.md document
  • compiled this code
  • tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)

@ahupowerdns
Copy link
Contributor

HOT

@rgacogne rgacogne changed the title [WIP] rec: Use a bounded load-balancing algo to distribute queries rec: Use a bounded load-balancing algo to distribute queries Mar 27, 2019
Copy link
Member

@chbruyand chbruyand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a little concern, but LGTM otherwise

pdns/pdns_recursor.cc Outdated Show resolved Hide resolved
@rgacogne rgacogne merged commit 46e6897 into PowerDNS:master Apr 1, 2019
@rgacogne rgacogne deleted the rec-bounded-load-balancing branch April 1, 2019 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants