-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Use preferred protocol first when resolving hostname #728
Conversation
Prior to this change, LookupIPAddr() is used to do the DNS query, which sends two DNS queries for A/AAAA records, even if the config has preferred protocol set to ip4 and does not allow fallback protocol. This change will change to use LookupIP() with the preferred protocol, and only try fallback protocol if it's set to true. In most cases doing this will save one RTT of DNS query. Signed-off-by: Yuchen Ying <[email protected]>
Signed-off-by: Yuchen Ying <[email protected]>
Signed-off-by: Yuchen Ying <[email protected]>
Signed-off-by: Yuchen Ying <[email protected]>
Signed-off-by: Yuchen Ying <[email protected]>
Thanks! |
I wonder if a new version can cut with this PR included? Or alternatively can you publish a nightly docker image? |
Does the docker image at prom/blackbox-exporter:master include this merge? |
@crockk It should be even though I'm actually using the master tag image and I see no change in the behavior. Either way this PR will be on 0.19 which for the looks of it it's just around the corner. |
…eus#728)" This reverts commit 847b668. Signed-off-by: Julien Pivotto <[email protected]>
Also related to golang/go#45024, need wait golang 1.17 release and upgrade. |
Prior to this change, LookupIPAddr() is used to do the DNS query,
which sends two DNS queries for A/AAAA records, even if the config has
preferred protocol set to ip4 and does not allow fallback protocol.
This change will change to use LookupIP() with the preferred protocol,
and only try fallback protocol if it's set to true. In most cases doing
this will save one RTT of DNS query.
Fixes #724