-
Notifications
You must be signed in to change notification settings - Fork 519
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
Performance issue with large A
and AAAA
answers
#259
Labels
Comments
Generic problem is that changing Sets to immutable is a major API change |
Couldn't we just change the |
We haven't just changed to the Python |
Merged
This is fixed by the new set code. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dns.Set code is O(n^2) and it may be bad for some use-cases.
One of automation toolkits feeding Roskomnadzor blacklist into tables of network equipment uses berserker_resolver module that relies on dnspython. dnspython itself uses significant amount of CPU while handling replies with large amount of RRs. Flame graph suggest that the reason of major slowdown is non-cached
to_digestable()
calls that can't be easily made cached due Rdata class being mutable.Attacker controlling some small number of "blacklisted" domains may cause significant consumption of CPU by automation toolkit and make the toolkit miss deadlines.
Following test against dnspython==1.15.0 shows non-linear increase of runtime (172.19.0.53 is address of my pdns_recursor):
Same is true for AAAA queries:
The text was updated successfully, but these errors were encountered: