Handling of network routing seemingly random

I am proxying a fetch request to my users, making the worker act as a proxy. Checking the headers of the request seems to give seemingly random locations for where this is proxied from. I require the worker to be extremely close to the user. For example: 1. Request from user located in MCI location 2. First test responds from CDG 3. Second test responds from MAD 4. Third test responds from DFW 5. Fourth test responds from IAD. 6. Fifth test responds from MIA. 7. Sixth test responds from CDG again. Why, this is in Paris, France, the file is in Frankfurt Germany, and the user is in MCI... This leads to very slow download speeds and slower than expected TTFB, which is not acceptable. Is CF-Ray accurate for workers? This article says it is: https://developers.cloudflare.com/fundamentals/reference/http-headers/#cf-ray
The Cf-Ray header identifies the data center processing the request when displayed as a response header. This is represented by a three-letter code corresponding to the data center's location.
I did some research and apparently workers runs in every datacenter location, so I am not sure why a user located nearest to MCI is not served the proxied file from MCI. Is there a way to fix this? I am on the paid workers plan, and the domain is on a Cloudflare Business plan, which should give me priority. I have not enabled smart placement, as I require the datacenter serving the request to be nearest the user, not the source. It should also be noted the files come from the EU/US with direct PNI to Cloudflare, so it's not the upstream being slow. We also do the same with BunnyCDN and their Edgescripting and it works fine with a similar approach.
Cloudflare Docs
Cloudflare HTTP headers
Cloudflare passes all HTTP request headers to your origin web server and adds additional headers as specified below.
3 Replies
Wamy
WamyOP3mo ago
CDN-CGI reproduces these findings
Chaika
Chaika3mo ago
Known thing for NA: https://discord.com/channels/595317990191398933/1409539854747963523/1409694837825081355 Business plan should exclude you from most of it, but it depends on time of day. That header is right and it's not about your routing to CF, it's internal request shuffling. This is CDN level though and not Workers
Wamy
WamyOP3mo ago
Insane

Did you find this page helpful?