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

How can we stagger DNS resolution queries #707

Open
nirvanagit opened this issue Feb 1, 2024 · 4 comments
Open

How can we stagger DNS resolution queries #707

nirvanagit opened this issue Feb 1, 2024 · 4 comments

Comments

@nirvanagit
Copy link

We use Istio, which uses Envoy, which uses the c-ares library for DNS resolution.

It is observed that Envoy does DNS resolution in a matter of 1-2 seconds, which overwhelms our DNS servers when there are thousands of entries to resolve.

Can the DNS resolution be spread out across a time window so that the systems are not overwhelmed?

@bradh352
Copy link
Member

bradh352 commented Feb 1, 2024

Currently there is no way to do that within c-ares itself as c-ares doesn't employ any sort of queuing mechanism, it sends requests immediately. It is known that many DNS servers do, however, employ rate limiting. There have been thoughts about adding a queuing system to c-ares but nothing has come to pass. I'd recommend contacting the upstream users of c-ares to see if they can rate limit the DNS queries at all.

@crrodriguez
Copy link
Contributor

Modern DNS server software is able to handle thousands of queries per second on very modest hardware.. soemthing does not seem right with the way you are trying to resolve your problem.

@bradh352
Copy link
Member

bradh352 commented Mar 1, 2024

What's funny is a lot of DNS servers have very low defaults for rate limiting, even on recursive name servers, or caching proxies like dnsmasq, which may make it appear that a server is overloaded when really its a configuration issue. However if you don't control the upstreams, that can be an issue.

@crrodriguez
Copy link
Contributor

dnsmasq assumes you are using a potato to run it, all limits are extremely low.
nsd: defaults to 200 queries per second if built with --enable-ratelimit
unbound : ratelimit is off be default
bind : rate limit off by default

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

No branches or pull requests

3 participants