in reply to daniel:// stenberg://

Does curl cache the discoveries it makes regarding fastest-responding IP results? I suspect the answer is "no of course not".

Maybe it should? An optional, probably short-lived, cache of "I did a dns lookup and here's the lag and thruput on the following IPs" might be handy.

Because a common use-case for me is repeatedly invoking curl against the same site and API with different query parameters - and I can see that optimization decision as being handy info to retain across executions for at least a few minutes.

Maybe an optional --cache-performance-data option.

PS. I dig the transparency on thought process - thank you for posting, and for curl. It's damn handy.