Question about datacenter ips

I’m in need of some clarification how Cloudflare handles country-of-origin-based routing.

consider a number of imageservers that go by img1.domain.tld, img2.domain.tld … plus images.domain.tld
images.domain.tld is a loadbalancer, that assigns img*.domain.tld based on geoip location to ensure least distance between user and imageserver.

On top of this configuration, a siteowner wants to put all these servers behind Cloudflare protection. The cf service assigned a specific ip to all of them, lets say and,
now each img*.domain.tld and images.domain.tld have both and in their A records.

The observation is now, that users from europe get assigned img1.domain.tld, users from the US get img2.domain.tld

images.domain.tld is in europe, so european users get good speeds. users from the US however see loading times up to 10 seconds.
When both run traceroutes to all domains, the last target entry is and respectively.

I have a slight feeling, that the inclusion of the Cloudflare ip (the same ip for all image servers) nullifies the benefits of the geolocation balancing mechanism. Is this a wrong assumption?

What is the best configuration for this case? I am confused on how Cloudflare handles this and where my confusion might stem from.

This topic was automatically closed after 14 days. New replies are no longer allowed.