Cloudflare
A network that sits in front of your application, between the visitor and your server. Its first job is passive: cache and serve your files from the point of presence closest to the visitor, absorb attack traffic, handle the domain name and the certificate. Its second job is active, and that one changes how you build: with Workers you run code directly on that network, with no server of your own behind it. Pages serves static sites and single-page apps, R2 stores files, D1 provides a distributed SQLite database. The Workers free plan gives 100,000 requests per day, with 10 milliseconds of CPU time per invocation; the paid plan starts at 5 dollars per month and includes 10 million monthly requests.
Strengths
- Delivery network, certificate and attack protection included, with no traffic cap on base plans
- Workers: code executed close to the visitor, with no server to administer
- R2 stores files with no egress fee, which changes the maths against classic object storage
- A free plan genuinely usable in production at small traffic
Limitations
- That network runtime is not Node: common libraries do not run there as-is
- Ten milliseconds of CPU per invocation on the free plan, heavy processing does not fit that budget
- A very wide product surface, the console takes real time to learn
- The more you adopt R2, D1 and Workers, the more moving back to a standard stack becomes a project
Best for
- A public application whose visitors are not all in the same country
- Logic to run before your application: redirects, rewrites, crawler-specific rendering