On Thu, Oct 1, 2020 at 6:36 PM Jason Proctor via curl-library <curl-library@cool.haxx.se> wrote: > > 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.
I think you should set up one curl handle for each address using CURLOPT_RESOLVE and then re-use the handles round-robin, so that you can benefit from connection re-use on TCP-connections that are already warmed up, as well as parallelism to multiple servers. Rainer ------------------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html