How often does python-requests perform dns queries

烂漫一生 提交于 2019-11-30 17:20:22

问题


We are using Locust to for load testing rest api services behind elastic load balancing. I came across this article regarding load balancing and auto scaling, which is something we are testing.

Locust is using python-requests which is using urllib3, so my question is if python-requests does a dns query for every connect, and if not, is it configurable?


回答1:


Locust is using python requests that is using urllib3 that is using socket.getaddrinfo which has DNS caching disabled according to this SO thread (given that your test machine runs linux).



来源:https://stackoverflow.com/questions/36087637/how-often-does-python-requests-perform-dns-queries

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!