Even happier eyeballs
#curl's connection racing goes next level
daniel.haxx.se/blog/2025/08/04…
Even happier eyeballs
Back in 2012, the Happy Eyeballs RFC 6555 was published. It details how a sensible Internet client should proceed when connecting to a server.daniel.haxx.se
Tom Bortels
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.
daniel:// stenberg://
in reply to Tom Bortels • • •@tbortels it does not cache that. I know the apple operating systems do, but they keep that in memory and know when the network change so that they can flush it correctly.
"Someone" should run tests and see if and how much there is to gain with such a cache as a first step to see if its worth it.