Knowledge Base ISC Main Website Ask a Question/Contact ISC
How does clients-per-query work?
Author: Cathy Almond Reference Number: AA-00344 Views: 234 Created: 2011-05-25 16:40 Last Updated: 2016-12-19 14:19 0 Rating/ Voters

Question:

There is often confusion over clients-per-query, especially when encountering logfile entries such as these below:

10-May-2011 13:01:02.745 resolver: notice: clients-per-query increased to 20
10-May-2011 13:21:02.747 resolver: notice: clients-per-query decreased to 19
10-May-2011 14:47:03.775 resolver: notice: clients-per-query increased to 15
10-May-2011 15:01:01.679 resolver: notice: clients-per-query increased to 15

Answer:

When there are multiple client queries received for the same 'name' (in fact same name and type) that cause the server to perform queries on the behalf of the requester, then named optimizes how it operates.  Behind the scenes, named is doing the necessary work just once, but the multiple requests (clients) are linked to that one piece of work.

clients-per-query controls how many of the 'same' request we can handle and it's dynamically adjusted according to need.

In named.conf, the clients-per-query option only sets the initial value (default 10) whereas max-clients-per-query sets the cap (default 100).

Thus the significant tuning knob here is max-clients-per-query which you need to have large enough to handle the situation where under normal processing where you have a lot of duplicate queries for the same name so that they can all wait until that name is resolved and placed in cache.

The other side of this is that if you server is stormed by duplicate queries from different clients, you want named to be dropping most of these queries - so you don't want max-clients-per-query to be too large
either. 

Most clients who don't get an answer will retry the query, so having max-clients-per-query too small for an unexpected but genuine peak in 'same' client queries should cause more than a short delay in query resolution - noting particularly that once the query is resolved by the server, it will be added to cache so that query retries can be answered immediately.


a bug was found in how the clients-per-query code worked with some query patterns. This could result, in rare circumstances, in having all the client query slots filled with queries for the same DNS label, essentially ignoring the max-clients-per-query setting.  It is fixed in 9.4-ESV-R5, 9.6-ESV-R4, 9.6.3, 9.7.3, 9.8.0 and all superseding minor revisions and newer major versions.

3009.    [bug]     clients-per-query code didn't work as expected with
                             particular query patterns. [RT #22972]


© 2001-2017 Internet Systems Consortium

For assistance with problems and questions for which you have not been able to find an answer in our Knowledge Base, we recommend searching our community mailing list archives and/or posting your question there (you will need to register there first for your posts to be accepted). The bind-users and the dhcp-users lists particularly have a long-standing and active membership.

ISC relies on the financial support of the community to fund the development of its open source software products. If you would like to support future product evolution and maintenance as well having peace of mind knowing that our team of experts are poised to provide you with individual technical assistance whenever you call upon them, then please consider our Professional Subscription Support services - details can be found on our main website.

Feedback
  • There is no feedback for this article
Quick Jump Menu