Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Can Curl round-robin IP addresses for successive connects?

From: Jason Proctor via curl-library <curl-library_at_cool.haxx.se>
Date: Thu, 1 Oct 2020 09:32:47 -0700

Dear Curl,

Our application pulls resources from CloudFront and we noticed some
significant bandwidth capping. Turns out that for maximum throughput,
Amazon recommend requests be spread across the IP addresses returned
by the DNS call.

However from looking at Curl_connecthost() and related functions, it
seems that Curl only round-robins through cached addresses when there
is a connect error.

If that's true, then our options are --

(1) shorten the Curl's DNS cache lifetime and specify
CURLOPT_DNS_SHUFFLE_ADDRESSES (or not, if as it seems the resolve call
shuffles addresses to permit naive applications to round robin by
default)

(2) do the resolve ourselves and manually set Curl's DNS cache entry
for the host to a random address using CURLOPT_RESOLVE

Are there other options? Can Curl be configured or persuaded to round
robin in the success case?

Thanks so much for Curl!
Jason_at_Spatial
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2020-10-01