By way of background:
Limited testing (10-20k requests per day), small number of users spread over a number of different ISPs/■■■, all GEO-IP as GB (they are in GB). Cloudflare free plan on the domain, with paid for Workers.
The vast majority of these GB requests are terminated in LHR (i.e. GB). Periodically however I can see the workers being triggered in (very) far flung DCs (e.g. Australia) at which point response times go through the roof - as both the users’ data must traverse the entire world to/from the Worker, along with any subsequent requests from the Worker itself back to API endpoints in GB.
I have manually tested based on the following:
- Same source IP/AS
- Based on the DNS response at the start time of testing - hard-coded one of the IPs in /etc/hosts (i.e. all requests for testing will be sent to the same IP)
- Ping times (throughout the testing) to said IP are all ~6ms
- Traceroutes, sent immediately prior each test (new TCP session per test), are identical
3 requests, sent within seconds of each other - 2 ended up in LHR and 1 in BNE (AUS ). Observed response times correspond with DC (i.e. AUS requests = slow).
On a more general note - this appears to occur sometimes just for a few hours (e.g. through the evening, in GB) or sometimes for a day or more - then it can be weeks before it occurs again. If I had to guess I suspect it first started occurring within the last year/6 months or so (note: with no noticeable change in users/number of requests/etc). Most recently this occurred 2021-04-28 ~16:10 > ~22:20 (BST).
I accept that by attempting to build a service on “the cloud”, in this case Cloudflare’s edge worker infrastructure, I’m entirely reliant on said provider’s ability (or willingness, in the absence of a Business or Enterprise plan) to service those requests in a timely manner.
I do not however think it unreasonable to not expect requests to be serviced by Cloudflare’s edge at the very farthest point on earth from the users’ initiating those requests. “Nice service you have there - how would you like its packets to travel around the earth twice?”
To the question at hand:
Has anyone else observed such wild mismatches between client GEO-IPs and CF Worker DCs?
Does Cloudflare’s DC Worker allocation logic/control have any regional awareness? and is this plan-specific?