469,612 Members | 1,674 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,612 developers. It's quick & easy.

need to reduce DNS queries in a python application

1 Bit
recently I found that a high amount of DNS queries related to my database which was hosted at AWS are sent from my python application. I have fixed it in my separate Java project by overriding java.security file and by changing the networkaddress.cache.ttl parameter to 1hr. I need to apply the same thing to my python application. I am using the requests library. can anyone suggest a way to implement this? Thanks
4 Weeks Ago #1
1 12351
dreamtext
22 Expert 16bit
have you looked at
https://dnspython.readthedocs.io/en/...r-caching.html

Seems you would have to initiate a cache and put records into it and flush the keys at the time frame you need
The dnspython resolver does not cache by default, but caching can be enabled by creating a cache and assigning it to the resolver’s cache attribute. If a cache has been configured, the resolver caches both positive and negative responses.
1 Week Ago #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

52 posts views Thread by Dick Moores | last post: by
3 posts views Thread by Ajay | last post: by
35 posts views Thread by Michel Sanner | last post: by
reply views Thread by loial | last post: by
5 posts views Thread by dongarbage | last post: by
3 posts views Thread by helzer | last post: by
4 posts views Thread by ron.longo | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.