Cloudflare Workers + D1 + R2: Zero-Egress Stack Cost

Estimate a zero-egress serverless stack on Cloudflare Workers Paid, D1, and R2 from 1k to 100k monthly active users.

Stack Cost Summary: Cloudflare Workers Paid ($5/mo), D1 (25B rows read included), and R2 ($0 egress) eliminate bandwidth spike bills, leaving D1 row-scan volume as the main scaling watchpoint.

Estimate my stack cost

Verified catalog rates as of 2026-12-01 00:01 UTC.

Verified catalog
Pro engineering assumptions
Monthly Bill$483/moAll 6 layers tracked
Viral Spike RiskUncapped10× month ≈ $4,790 · usage-based spend
Flat-Rate AlternativeAbout evenWithin $1/mo of Flat-Rate Coolify + VPS
Compare flat-rate hosting →
Monthly cost from 0 to 100k monthly active users: your stack vs flat-rate alternative $0$5.5k0 users50k100k

Purple line: your stack. Green line: flat-rate swap. Dashed line: your current users.

Billing cliff alerts

Amber cards show a price jump your current inputs have already crossed.

Watch · D1 row-scan explosion

50M rows read/mo, under 25B included. Unindexed queries multiply this.

Your 6-layer stack

Change any layer to see the bill move. The flat-rate swap uses the same sliders and assumes one VPS; capacity limits and migration effort are not modelled.

Layer Your option Monthly Flat-rate swap
1 · Build$0/moOpen-source CLI$0/mo
2 · Compute$5/moFlat VPS + Coolify$4.59/mo
3 · Database$0/moPostgres on VPS$0/mo
4 · Auth$0/moBetter Auth (OSS)$0/mo
5 · Storage & CDN$1.35/moCloudflare R2$1.35/mo
6 · AI runtime$477/moOpenRouter hybrid$477/mo
Ops time (Pro)4 h/mo on self-hosted VPS$0/moSwap: $0/mo
Total (tracked)$483/moSwap: $483/mo

Cost at 0 / 1k / 10k / 50k / 100k users

Dollars per month. Traffic and AI usage scale in proportion to your current sliders. Small figure under the swap cost: how much more (+) or less (−) your stack costs.

Users Your stack Flat swap
0 users$5$4.59+$0.41
1,000$52.70$52.29+$0.41
10,000$483$483+$0.41
50,000$2,397$2,397+$0.41
100,000$4,790$4,789+$0.41

Zero-egress architecture without viral bandwidth anxiety

For solo builders serving media-heavy apps, global APIs, or high-traffic dashboards, bandwidth egress is usually the scariest line item. On Cloudflare Workers Paid ($5/mo base) paired with R2 object storage ($0.015/GB-month after 10 GB free and $0.00 egress), a 10× traffic spike does not trigger a surprise $0.09/GB or $0.15/GB bandwidth invoice.

The subtle cliff to watch on Cloudflare D1 is row-scan volume. Workers Paid includes 25 billion rows read per month, with overages billed at $0.001 per million extra rows read. Well-indexed point lookups stay far below 25B rows even at 50k+ MAU, but an unindexed full-table scan inside a hot endpoint (use the DB rows read per request input in the Pro drawer) can multiply row reads by 100×. Pairing Workers with Hyperdrive + external Postgres avoids row-read billing entirely for scan-heavy analytics.

When this stack wins