Articles
Cloudflare or Fastly: what you are actually choosing
Both sit in front of your site and both get called a CDN. The decision is how much of your stack you hand over — DNS, certificates, cache rules, edge code.
- comparison
- infrastructure
- performance
Both products stand in front of your site, terminate the TLS connection and get called a CDN, and for a brochure site either will do. The difference is how much of your stack you hand to one account: Cloudflare takes DNS, certificates, caching, the firewall and a JavaScript runtime at the edge, while Fastly expects DNS and certificates from somewhere else and offers a programmable edge in return for that separation. The choice flips on how much surface you want one vendor to own, and on where your visitors are.
What is actually being cached?
Static files are the easy half: images, CSS, JavaScript and fonts are cached by extension in both products, so the first deploy looks like success.
HTML and API responses are the other half, and this is where a CDN quietly does nothing. A page that sets a cookie or answers with Cache-Control: private is not cached by either vendor, and should not be. The trap is the page that could be cached and is not: a product listing or a blog post rendered by the origin on every request, while the operator believes the edge is handling it. The origin's log settles it; if it still sees one request per visitor, nothing is cached, whatever the rule panel says.
Where does your logic run?
Cloudflare runs JavaScript at the edge in short-lived isolates, and the same code can read the cache, redirect by country or rewrite a response. Fastly compiles a service — Rust, JavaScript or Go — to WebAssembly and places it in the request path with an explicit cache interface.
The practical question is what your team already writes, because no answer about runtime speed survives a year. A frontend team living in TypeScript can put a redirect or a split at the edge this week and maintain it. A team with no JavaScript on the server finds either model new, and the cheaper path there is usually to leave the logic in the application.
One more question: can the edge code see the cached response, or only the request? That decides whether a personalisation header can be added without disabling the cache.
Who owns DNS and the certificate?
This is the dependency most comparisons skip, and where an outage comes from.
Cloudflare is also a registrar and an authoritative DNS host, so proxy, records, certificate and firewall sit in one control plane. Convenient, and it concentrates risk: one wrong record removes the site for everyone, and DNS becomes part of what you debug.
Fastly is a service you attach to. DNS stays with your provider and you point a record at the edge, which keeps the two failures separate — but you now own the certificate lifecycle and the renewal reminder, and an apex domain needs a provider that supports CNAME flattening.
Neither arrangement is safer by nature. Name the person who renews the certificate before the first deploy.
What does North African traffic actually get?
Distance to the nearest point of presence decides more than the vendor's name. Both networks are anycast, so a visitor in Algiers reaches whichever location routing prefers, usually through Marseille rather than from inside the country.
The useful question is not how many locations exist, but which ones serve Algeria. Ask for the point-of-presence list for the region, then measure from the city your customers are in, on mobile data, at the hour they shop. On a 4G link the round trips before the first byte matter more than the weight of an image.
That is the measurement you would take anyway: Core Web Vitals defines what the visitor experiences, and the field numbers come from real sessions rather than a status page.
What does leaving cost?
More than a migration plan admits, and the cost is configuration rather than data.
Cache, firewall and redirect rules are written in each vendor's own language. No portable format exists, so a move means rewriting them from the behaviour you can observe — and the behaviour you cannot observe is what breaks. Edge functions are rewritten too, a Worker is not a Compute service, and log pipelines, alert thresholds, origin allowlists and the certificate change with them.
Add the human cost: one person knows why a rule exists, and that knowledge is not in the repository. Pilot on a subdomain first, and keep the TTL low enough that a rollback takes minutes.
What does the whole choice look like side by side?
| Dimension | Cloudflare | Fastly |
|---|---|---|
| What it takes over | DNS, certificates, cache, firewall, edge code | Cache, edge code, TLS at the edge |
| Where logic runs | JavaScript isolates, cache-aware | WebAssembly services, explicit cache API |
| DNS and certificates | One control plane for both | DNS elsewhere, lifecycle yours |
| The question to ask | Which locations serve Algeria, and how | The same question, same measurement |
| What to verify yourself | What the plan includes before you rely on it | How a certificate is renewed, and by whom |
How should a team decide?
- Measure the current site from your customers' city, on mobile data, and keep the number.
- List what must be cached, page by page, and what must never be.
- Decide whether the edge holds logic at all. If not, the choice is DNS and certificates.
- Name the owner of DNS and of the certificate, in writing, before either moves.
- Pilot on one subdomain, then move the apex with a low TTL and a written rollback.
Where this goes wrong
- A cached page with a session in it. Someone caches everything to fix speed, and one customer sees another customer's basket.
- A certificate nobody renewed. The reminder went to a mailbox belonging to a contractor who left.
- A firewall rule that blocks a payment callback. The site is up, the checkout is not, and support finds out first.
- A CDN in front of a slow origin. Every request still waits for the database.
- Rules nobody can explain. Two people edit one rule set for a year, then a change breaks a path nobody remembered.
What this advice leaves out
No prices and no benchmarks appear here: both vendors price by traffic and feature, and milliseconds measured elsewhere say nothing about Algiers. The last row of the table is the one to open in another tab.
This also leaves out multi-CDN setups, bot management bought separately, and the load test on your own origin — an edge cannot fix an application that answers slowly. We configure and migrate edge rules and origins, resell neither product and take no commission, so the comparison carries no commercial interest.
We build the origin and the edge rules together, because the caching decision belongs in the application before it belongs in a vendor panel.
Services in this article
Articles
Related articles.
Who holds your domain and where the site actually runs
Registrar, DNS, hosting, certificate and mail are five subscriptions with five renewal dates. What each one decides, and the page to write before it breaks.
- hosting
- domains
- infrastructure
Why your site feels slow in Algeria — and what actually fixes it
Slow here is usually weight and distance, not the phone. Measure first, then fix images, fonts, third parties and caching in that order.
- performance
- hosting
- mobile
A website is a subscription, not a purchase
The invoice pays for the build, not for the site. What decays on its own, how upkeep differs from a change, and what a monthly arrangement should contain.
- websites
- maintenance
- operations
Start a project
Have something to build?
One short brief is enough. You get a written scope and a fixed quote before anything starts.
