Hauntboard hosts its entire Next.js 16 web application on Cloudflare Workers' free plan using OpenNext (@opennextjs/cloudflare) and a Cloudflare R2 incremental cache. That architecture gives us commercial-friendly hosting at $0 per month with zero bandwidth egress fees, which we compare directly in Vercel vs Cloudflare Workers & Pages.
Free plans come with hard technical ceilings, though, and on a content-heavy site heading toward 2,000 pages, the constraint you hit quietly if you ignore it is Worker bundle size.
Why Bundle Size Matters on Cloudflare Workers
According to Cloudflare's Workers Limits documentation, every Worker script has a hard 64 MiB uncompressed size limit on both the Free and Paid plans, alongside a 1-second maximum Worker startup time, 10 ms of CPU time per HTTP request on Free, and 100,000 requests per day on Free. Notice that upgrading to the $5 Paid plan lifts CPU time and daily requests, not the 64 MiB uncompressed Worker limit.
In a typical Next.js project, your JavaScript bundle stays small because user content lives in a database. On Hauntboard, our editorial families (founder guides, glossary definitions, copyable templates, software comparisons, best-of lists, platform reviews, and blog posts) live in typed TypeScript modules under lib/ so build-time tests can validate every link, word count, and duplicate threshold. When OpenNext compiles server routes into .open-next/worker.js, any module imported by a server route handler, dynamic page, or metadata helper sits inside that Worker upload.
How OpenNext and R2 Cache Keep Free-Plan CPU Low
Our setup in open-next.config.ts and wrangler.jsonc relies on four pieces working together so cached pages avoid booting heavy server rendering on repeat traffic:
| Layer | Configuration | Role on the free plan |
|---|---|---|
| Incremental cache | withRegionalCache(r2IncrementalCache, { mode: "long-lived" }) | Stores rendered HTML and cachedQuery results in R2 bucket hauntboard-cache |
| Cache interception | enableCacheInterception: true | Serves cached pages before loading the Next.js server handler |
| Revalidation queue | doQueue (DOQueueHandler) | Rebuilds stale launch pages via WORKER_SELF_REFERENCE when revalidate expires |
| Tag invalidation | doShardedTagCache() (DOShardedTagCache) | Clears updated pages when admins approve launches or trigger revalidation |
We explain the R2 storage economics in Cloudflare R2 vs AWS S3. Pairing R2 with enableCacheInterception: true ensures that static guides, tools, and comparisons spend virtually zero Worker CPU on normal page views, leaving the 10 ms Free-plan CPU window for fresh dynamic renders and revalidations. We also keep per-launch generated Open Graph cards (opengraph-image.tsx) turned off on the free plan so image rendering never competes for Worker CPU or adds heavy font and canvas dependencies to the bundle.
Tracking Growth From 10.8 MB to 20.3 MiB
Numbers tell us when a clean architecture starts getting heavy. On 10 November 2026, our OpenNext build produced a server handler around 10.8 MB alongside 574 cache files and 112 static asset files. Fifteen days later, after finishing Phase 1 of our library at 456 indexable URLs across guides, best lists, comparisons, tools, platforms, and blog posts, our Wrangler bundle check recorded roughly 20.3 MiB Total Upload.
That leaves more than 43 MiB of headroom before hitting Cloudflare's 64 MiB ceiling, which is comfortable today. At the same time, watching the jump from 10.8 MB to 20.3 MiB makes the growth curve concrete instead of a surprise two months before launch-library milestones. Because Cloudflare checks uncompressed size rather than gzip size, plain HTML strings inside TypeScript modules count directly toward that limit.
The 32 MiB Trigger to Split Static Content Out
Rather than over-engineering storage early, we set an explicit halfway rule in our architecture notes: track Wrangler's Total Upload on deploys, and if the bundle approaches 32 MiB (half of the 64 MiB limit), move long-form editorial HTML bodies out of the compiled JavaScript bundle and into per-slug JSON files served from Cloudflare static assets or R2.
Keeping lightweight metadata (slugs, titles, categories, dates, and gates) inside TypeScript keeps our build-time SEO tests and sitemap generators instant, while loading body HTML from static assets or R2 by slug keeps the Worker script itself compact even if the library grows past 2,000 pages. Splitting large data files by cluster also keeps TypeScript type-checking and editor tooling snappy along the way.
Keeping Static Prerendering Sustainable to 2,000 Pages
Bundle size is only half the story; prerendering strategy is the other half. Every editorial route uses generateStaticParams so Next.js renders its HTML once during the build and uploads the result straight to R2, rather than rendering on first request inside a 10 ms CPU budget. Since Workers Free allows up to 20,000 static asset files per version, storing prerendered cache entries in R2 keeps static assets well clear of version limits too. You can read more about how we structure static generation and Next.js metadata in our Next.js SaaS SEO guide and our static site generation glossary entry.
Launch-driven pages stay on hourly revalidation so new votes and visits surface cleanly, while our Launch Readiness Checker verifies live HTML headers and metadata once deployed. If build times ever climb as the library nears 2,000 pages, we can keep prerendering editorial families and let long-tail launch pages render on first visit into R2. Watching Total Upload after every major content batch lets us grow the library steadily without breaking the free-tier budget that keeps Hauntboard sustainable. If you are building a lean product on a similar stack, submit your launch and see how it runs.