fastest for them.
fastest for themright now.
right now, based on RUM.~660
340+ Cloudflare, 210+ Gcore and 114 Fastly
340+ Cloudflare, 210+ Gcore and 114 Fastly, as at Nov 2026The experiment lives at cdn.jamesst.one, which now serves a copy of this site, and you can watch where it is routing at rum.jamesst.one.
How a normal CDN works
A plain server has one IP address in one place, so every visitor’s packets travel all the way to it. A CDN instead announces the same IP addressfrom hundreds of locations,
from hundreds of locations at once (this is called anycast: one address, many machines, and the network decides which one you reach),151.101.1.242, one of Fastly’s addresses this site uses, answers in 0.6 to 2 ms from Globalping probes in Copenhagen, Singapore and Melbourne alike. No single machine can be that close to all three.
The above diagram is actually a simplification, because before that, a client first has to look up the IP address to connect to, i.e. DNS. A multi-CDN hooks into the DNS reply and picks which CDN is best, then that CDN’s anycast picks which specific data center based on network routing rules.
How it fits together
The CDN is chosen in DNS. When your resolver asks for cdn.jamesst.one, the answer is a CNAME to one of three CDNs, and which one depends on where you are. Or, more accurately, the network you are on.
- DNS: Gcore Managed DNS. Its free plan supports “dynamic” records: a set of answers with metadata (countries, continents, networks) and pickers that choose one per query.
- The CDNs: Fastly, Gcore CDN and Cloudflare Pages. All three pull from the same origin and add the same response headers, plus a
Server-Timing: cdn;desc="fastly"style header so every measurement knows who served it. -
a small Go service that collects measurements, scores each CDN per country, continent and network, and recommends a routing policy.
rumd:
rumd, the RUM daemon, as in Real User Monitoring: - dnsctl: applies that recommendation to Gcore, but only once it has been stable for a few checks and a minimum interval has passed, so DNS does not flap.
The free tier gotchas
| Thing | What I hit |
|---|---|
| Cloudflare | The free plan only proxies a domain if Cloudflare hosts its DNS. Cloudflare for SaaS (custom hostnames) works with outside DNS, but needs a root domain zone in your account, and I wanted DNS to stay on Gcore. Cloudflare Pages saved the day: a Pages project accepts a subdomain on someone else’s DNS as a custom domain. A tiny Worker in the project proxies to the origin and adds the headers. |
| Gcore DNS | One dynamic record set, at most three records, minimum TTL 120s. So at most three CDNs can be live at once. (I checked: a fourth record is refused.) |
| Certificates | Every CDN has to prove it controls cdn.jamesst.one. Fastly uses a DNS challenge, but Gcore and Cloudflare Pages validate over HTTP, which only works while DNS sends the validator to them. The first certificate meant pointing DNS at Pages for a few seconds. Renewals are a problem I have not fully solved. |
| Cloudflare Pages | Pages custom domains are built on Cloudflare for SaaS, which marks a hostname as “moved” once it stops pointing at Cloudflare and deletes it after a week. If Pages does the same, a multi-CDN setup is in trouble, since it points elsewhere most of the time… still watching this one. |
Measuring without JavaScript
The first version used a small script on the page that read Resource Timing entries and beaconed them home. It worked, but I would rather not put JS on pages for this. jsDelivr itself gets its RUM data from elsewhere: it used Cedexis, then PerfOps, rather than running a script of its own.
Network Error Logging turned out to be a nice alternative. Each CDN sends aNEL
NEL (Network Error Logging)success_fraction: 1, and Chromium browsers then report every request, not just failures, including how long it took. Two catches:
- A NEL report has no custom headers, only the server IP, so attribution is by each CDN’s IP ranges. Gcore publishes an IP list, but it turned out to be the addresses it uses to fetch from the origin, not the edges visitors connect to. Using the prefixes its network announces fixed it.
- Only Chromium browsers send NEL.
Measuring without traffic
The real problem: it is an experiment, nobody is going to visitcdn.jamesst.one. So I used jsDelivr’s other project, Globalping, a network of community-run probes you can ask to run measurements for free.
Every 5 minutes a job picks 10 probes randomly from around the world and pings each CDN’s edge from them (TCP to port 443). Cloudflare is pinged first, and Fastly and Gcore reuse its probes, so every round compares the CDNs from exactly the same places. Routing now uses these pings rather than actual RUM page loads - so it’s not as ideal as it could be.
What it looks like from real networks
Here is one Globalping HTTP measurement: GET /blog on cdn.jamesst.one, through normal DNS, from 12 probes on home broadband and mobile networks (25 Nov 2026, 14:27 UTC). Every request returned 200, and DNS had split the world three ways: most of Europe got Cloudflare Pages, Asia and North America got Gcore, and South America, Australia and Hamburg, Germany got Fastly.
| Location | Network | Served by | Cache | DNS lookup | First byte | Total |
|---|---|---|---|---|---|---|
| London, GB | British Telecommunications | Cloudflare Pages | HIT | 0 ms | 103 ms | 141 ms |
| Vienna, AT | T-Mobile | Cloudflare Pages | HIT | 1 ms | 70 ms | 110 ms |
| Düsseldorf, DE | Vodafone | Cloudflare Pages | HIT | 1 ms | 137 ms | 207 ms |
| Chicago, US | Comcast | Gcore | – | 31 ms | 23 ms | 100 ms |
| Kuala Lumpur, MY | TM Technology Services | Gcore | – | 292 ms | 34 ms | 396 ms |
| Taipei, TW | Data Communication Business Group | Gcore | – | 74 ms | 33 ms | 164 ms |
| Calgary, CA | Shaw Communications | Gcore | – | 631 ms | 50 ms | 803 ms |
| Hamburg, DE | Deutsche Telekom | Fastly | HIT | 7 ms | 202 ms | 267 ms |
| Brisbane, AU | Aussie Fibre | Fastly | HIT | 0 ms | 229 ms | 253 ms |
| Melbourne, AU | Aussie Fibre | Fastly | HIT | 1 ms | 266 ms | 281 ms |
| Santiago, CL | Telefónica Empresas Chile | Fastly | HIT | 1 ms | 193 ms | 208 ms |
| São Paulo, BR | Telefónica | Fastly | HIT | 250 ms | 43 ms | 307 ms |
“Served by” comes from the Server-Timing header each CDN adds, and Gcore does not report cache hits, hence the dashes. This was the second run from the same probes, two minutes after the first: on that first run every Fastly request was a cache miss that went all the way back to the origin in Singapore, taking 1.5 to 2.7 seconds, and most DNS lookups were slower because the resolvers had nothing cached yet. Hamburg and Düsseldorf landing on different CDNs is the DNS working per network: Gcore answers based on where the resolver appears to be, not the probe.
Two things stand out. Düsseldorf on Cloudflare (207 ms) beat Hamburg on Fastly (267 ms), and Fastly’s cache hits took 190–270 ms to the first byte in Hamburg, Brisbane, Melbourne and Santiago (São Paulo: 43 ms). Fastly’s own X-Timer header puts that time inside Fastly’s edge, not on the network, and I haven’t worked out why yet.
It also shows the limit of routing on pings: they measure how close each CDN’s edge is (all within a couple of ms here), not how fast it answers an HTTP request.
Both are in Germany, so why the split? Gcore never sees the visitor, only the DNS resolver asking on their behalf (and the visitor’s subnet, if the resolver passes it on). At the time the record sent Germany to Fastly and the rest of Europe to Cloudflare Pages. Telekom’s resolver was placed in Germany; the Vodafone resolver the Düsseldorf probe used evidently was not, so it fell through to the Europe rule. Asking Gcore directly with German Vodafone and Telekom subnets both return Fastly, so it is the resolver, not the network:
Caching HTML on three CDNs
Each CDN reads a different header to decide how long to keep a page:
| CDN | Header it listens to |
|---|---|
| Fastly | Surrogate-Control (and strips it before it reaches you) |
| Cloudflare | CDN-Cache-Control |
| Gcore | its own rules; it ignored s-maxage next to max-age=0 |
So the origin sends all of them: an hour for the home page, blog list and tags, six hours for everything else, while browsers still revalidate every time.
A bonus: routing around outages
If a CDN goes down, a multi-CDN routes around it by updating DNS. Here a probe checks each CDN every 30 seconds, and after three failures in a row dnsctl takes it out of the DNS answers. Resolvers may keep the old answer for up to two minutes, so the switch takes a few minutes, with nobody having to wake up.