Building on Cloudflare Workers: Why Edge-First Matters
2 min read
The entire content pipeline runs on Cloudflare. Not because it’s trendy — because it’s the right tool for a globally distributed content system.
The stack
| Component | Cloudflare Service | Purpose |
|---|---|---|
| Site | Workers + Astro | SSR blog + API |
| Database | D1 | Subscribers, posts, jobs |
| Cache | KV | Sessions, rate limits |
| Storage | R2 | Media, OG images, archives |
| Queues | Cloudflare Queues | Fan-out distribution |
| Email Services | Newsletter + confirmations | |
| AI | Workers AI (optional) | Embeddings for search |
Cold starts don’t exist here
Lambda cold starts: 500ms–5s. Workers cold starts: <5ms.
When a visitor hits a blog page, the Worker is already warm. The Astro SSR renders in milliseconds. D1 queries resolve locally in the same data center. No round-trip to us-east-1.
D1: SQLite at the edge
D1 is SQLite replicated globally. For a content pipeline, this means:
- Subscriber lookups are local
- Job state queries are fast
- No connection pooling headaches
- Built-in migrations via Wrangler
The trade-off: eventual consistency across regions. For a blog and newsletter, that’s fine. Subscriber count doesn’t need to be real-time accurate.
The $5/month budget
For a solo creator, cost matters:
- Workers: 100k requests/day free
- D1: 5GB storage, 5M reads/day free
- KV: 100k reads/day free
- R2: 10GB storage free
- Queues: 1M operations/day free
The paid plan ($5/month Workers Paid) unlocks higher limits and production features. That’s the entire infrastructure cost.
What about Vercel/Netlify?
They’re great for frontends. But the content pipeline needs queues, a database, cron triggers, and email. On Vercel, you’d add:
- PlanetScale/Neon for database ($20+/month)
- Upstash for Redis ($10+/month)
- Resend for email ($20+/month)
- QStash for queues ($10+/month)
Cloudflare bundles all of this. The DX trade-off is real (Wrangler isn’t as polished as Vercel CLI), but the cost and latency advantages are undeniable.
Lessons from production
- Use
wrangler devlocally — miniflare simulates all bindings - Migrate early — D1 migrations are immutable, plan the schema upfront
- Queue everything — fan-out pattern with per-platform queues is cleaner than one mega-worker
- Cache at the edge — KV for hot data, D1 for persistent state
The edge-first architecture isn’t just about latency. It’s about simplicity. One platform, one bill, one deployment target.
Ready to scale your content?
Book a free strategy session and get a personalized cross-platform distribution plan.
Book a Call