Next.js on Cloudflare: Cost Breakdown and a False BugNext.js on Cloudflare: Cost Breakdown and a False Bug
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
Requests nearly doubled (bots included). My Cloudflare cost per request fell 38%.
Here is what moved the bill on a Next.js app I run alone (OpenNext on Workers, with D1, KV, R2 and Durable Objects), priced line by line for 89 days at list price, and the one fix that fixed nothing.
The numbers: $9.48 a day for production, Worker requests up 86% (bots and my own test traffic included), and cost per 1M requests down 38% ($74 → $46).
The best lesson came from a fix that fixed nothing. Cache analytics showed keys written 2, 4, 6 or 8 times a day, which looked like a race condition. The fix missed its pass bar (6.07 against at most 4). That miss made me check the data: the R2 analytics dataset is sampled, and one sampled event comes back as a weighted count of 2, 4, 6 or 8. The totals match the bill; per-key counts do not.
Three lines to check if you run Next.js on Cloudflare:
1. Cache writes cost as much as compute.
2. The page-regeneration queue bills the time it spends waiting.
3. A KV write on every flag check adds up fast.
Full write-up with the billing screenshots and the method: Next.js on Cloudflare at $9.48/day list price, and the bug that wasn't there

dev.to

Next.js on Cloudflare at $9.48/day list price, and the bug that wasn’t there

What it costs one engineer to run a Next.js job platform on Cloudflare, priced line by line at list…

Ahmar's avatar
Breaking down real production costs line by line for OpenNext on Workers is super helpful. Which Cloudflare service ended up driving most of that 38 percent drop?
Back to feed
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started