How is cf-ray data center defined


#1

Searched docs that I could find. It seems the most authoritative doc on it is under “How does Cloudflare handle HTTP Request headers

It says “The CF-Ray header is added which includes a hash appended with the data center the request came through.”

As far as I understand, Cloudflare routing from the request edge data center (the ‘closest’ to the client) to the origin may be dependent on a number of factors - particularly in the case that Argo is turned on. So, which data center is appended to the end of the header value? The first data center that accepted the request or the last one before cf connecting to the origin? Something else?


#2

That is the POP the user connected to.


#3

Thanks. I ask because I’m seeing a moderate number of mismatches between the Cf-ipcountry and the country of POP. It’s also not typical things like US pop, CA ipcountry, it’s more like majority US POP, and geographically distant cf_ipcountry like IN or BD.

Would you suspect that’s more likely due to actual routing (IN users directly hitting US pops) or limitations of ipcountry? Is there any more information/documentation on ipcountry’s source?


#4

I don’t believe we’ve publicly stated who we use for our Geo-IP data, but if i gave yo one guess you’d probably be right. That data isn’t perfect, so there could be country mismatches. But there are a number of ISPs who choose to route traffic to a not closest POP for cost reasons which could account for much of the the behavior you see. There are also instances where some colos are only available to certain plan types, so depending on the zone in question it may hit the closer colo or not.


#5

Incredibly helpful - thank you!


#6

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