Infrastructure Evaluation

Cloudflare Migration Evaluation

Should etoro-web and SEO market pages move from OCI to Cloudflare?

April 23, 2026 Prepared by WebClaw For: Yoni Assia

Verdict: Partial Migration

SEO pages are a clear win for Cloudflare. The main Next.js + Payload CMS app should stay on OCI. Saves $231/mo vs. planned OKE approach.

Migration Decision Matrix

Each component of our infrastructure evaluated independently for Cloudflare fit.

SEO Market Pages

R2 + Workers. 336K+ pages served globally. $9/mo.

etoro-web App

Payload CMS incompatible. Stay on OCI.

PostgreSQL DB

Keep local on OCI. Zero latency, zero cost.

Media/Uploads

Consider R2 for CDN in Phase 2.

Current vs. Cloudflare

Side-by-side comparison of our infrastructure stack on OCI versus what Cloudflare offers.

Aspect Current (OCI) Cloudflare Option Verdict
Compute VM (8 vCPU, 31 GB RAM) Workers (128 MB memory cap) Downgrade
Runtime Node.js 22 (full) workerd (partial Node.js) Partial
Database PostgreSQL 16 (local) Hyperdrive (proxy to external PG) Added latency
Storage Local disk (free) R2 ($0.015/GB-mo, free egress) Better CDN
CDN Caddy + CF DNS proxy Native CF CDN (300+ cities) Better
SSL/TLS Caddy auto-TLS CF auto-TLS Equal
CI/CD git pull + build Workers CI or wrangler deploy Better
Cost ~$0/mo (free tier) $35-70/mo (full migration) More expensive
Image Optimization next/image (local) Cloudflare Images (extra $) Extra setup
File Uploads Local disk + API routes R2 + Workers (major rewrite) Blocker
CMS Admin Payload v3 admin UI Likely broken on Workers Blocker

Proposed SEO Pages Architecture

+---------------------------------------------------+ | Cloudflare Edge (300+ cities) | | | | [CF Worker] -------> [R2 Bucket] | | Smart routing 336K+ HTML files | | Locale detect /en/stocks/aapl | | Cache headers /de/crypto/btc | | 404 handling /he/etf/spy | | | | markets.etoro67.clawz.org | +---------------------------------------------------+ Generation (OCI/CI): etoro-web-generation --> build HTML --> upload to R2 Daily/hourly incremental updates

Why the Main App Can't Move (Yet)

Four critical blockers prevent migrating the Next.js + Payload CMS application to Cloudflare Workers.

1. Payload CMS Incompatible with Workers Runtime

Payload CMS v3 requires full Node.js: filesystem access (sharp, config loading), persistent server process, Express-like admin panel, and native PostgreSQL drivers. Workers' partial Node.js support, 128 MB memory, and serverless model break all of these. Payload has NOT announced Workers support.

2. Worker Size Limit (10 MB Compressed)

Next.js 16 + Payload CMS + all dependencies produce 50-150+ MB uncompressed bundles. Even with aggressive tree-shaking, the compressed Worker bundle would likely exceed Cloudflare's 10 MB limit for paid plans.

3. 128 MB Memory Hard Cap

Our app uses 1-3 GB on OCI under load. Workers isolates are capped at 128 MB total (JavaScript heap + WASM). This is a 10-25x reduction. Payload CMS's ORM, admin panel, and Next.js server runtime would exhaust this instantly.

4. PostgreSQL Requires External Hosting

No native PostgreSQL on Cloudflare. Hyperdrive proxies to an external PG, adding latency and requiring either exposing OCI PG to the internet or paying $25-50/mo for managed PostgreSQL (Neon, Supabase).

What Cloudflare DOES Support Well

Next.js 16 via OpenNext

The @opennextjs/cloudflare adapter supports Next.js 14, 15, and 16 with App Router, SSR, SSG, ISR, PPR, Middleware, Turbopack, and Composable Caching. Solid and actively maintained.

📦

R2 Object Storage

S3-compatible storage with zero egress fees. 10 GB free, then $0.015/GB. Perfect for static HTML, media assets, and file storage. Built-in CDN.

🌐

Global CDN

300+ cities worldwide. Sub-50ms TTFB for cached content. Automatic TLS. Cache-Control headers respected. Far superior to single-region OCI.

🔗

Hyperdrive (PG Proxy)

Connection pooling and query caching for PostgreSQL. Included in Workers Paid ($5/mo). Supports standard pg driver. Unlimited queries on paid plan.

Node.js Compatibility

Workers supports most Node.js APIs: Buffer, Crypto, Streams, HTTP, DNS, Path, URL, Events, Timers, Zlib. But fs, child_process, and cluster are stubs only.

📊

Workers Compute

Paid plan: 5 min CPU time, 128 MB memory, 10 MB bundle, 10K subrequests. Adequate for simple apps. Insufficient for Payload CMS + Next.js combo.

Cost Analysis

Comparing monthly costs across scenarios. The SEO-only migration saves $231/mo versus the planned OKE approach.

Current OCI (everything) $0/mo
Free
Cloudflare SEO Pages Only $9/mo
$9
Cloudflare Full Migration $35-70/mo
$35-70
Planned OKE for SEO Pages $240/mo
$240
CF Service What We'd Use Free Tier Paid Cost
Workers Paid Plan Base subscription 100K req/day $5/mo + $0.30/M requests
R2 Storage SEO pages + media (~15 GB) 10 GB + 10M reads $0.015/GB + $0.36/M reads
Hyperdrive PG connection proxy 100K queries/day Included in Workers Paid
D1 Database Not applicable (SQLite only) 5M reads/day N/A
KV Store Cache/config (optional) 100K reads/day $0.50/M reads
External PostgreSQL Only if main app migrates N/A $25-50/mo (Neon/Supabase)

Phased Migration Plan

A pragmatic three-phase approach: quick wins first, complexity later, full evaluation when the ecosystem matures.

1

Phase 1: SEO Pages to Cloudflare R2

Create R2 bucket, build routing Worker, upload 336K+ pages, set up subdomain, test globally, monitor.

Timeline: 1-2 weeks | Effort: 3-5 days | Cost savings: $231/mo vs OKE
2

Phase 2: Media Assets to R2 (Optional)

Upload media to R2, configure Payload CMS S3 adapter for new uploads, CDN-serve all images. App stays on OCI.

Timeline: Month 2-3 | Effort: 1-2 weeks | Risk: Medium
3

Phase 3: Re-evaluate Main App (Q4 2026)

Watch for Payload CMS Workers support, Workers memory increases, bundle size improvements. Decision point for full migration.

Timeline: Q4 2026 | Trigger: Payload CMS announces Workers support

Risk Matrix

Risk Probability Impact Mitigation
Payload CMS on Workers fails Very High Critical Don't migrate main app
Worker bundle exceeds 10 MB High Critical Don't migrate main app
128 MB memory insufficient Very High Critical Don't migrate main app
SEO pages R2 serving issues Low Medium Fallback to OCI static serving
R2 upload of 336K files slow Medium Low Batch upload, parallelize
CF outage affects SEO pages Very Low High CF has 99.99% SLA

Key Cloudflare Limits

Limit Free Plan Paid Plan
Worker requests 100K/day Unlimited ($0.30/M after 10M/mo)
Worker CPU time 10 ms 5 min max (default 30s)
Worker memory 128 MB 128 MB (hard cap)
Worker bundle size 3 MB 10 MB (compressed)
Static asset files 20,000 100,000
R2 storage 10 GB free $0.015/GB-mo
R2 reads 10M/mo free $0.36/M
R2 egress Free Free
D1 database 500 MB / 10 DBs 10 GB per DB / 50K DBs
Hyperdrive queries 100K/day Unlimited

TL;DR

SEO pages to Cloudflare R2: Do it. $9/mo, global CDN, saves $231/mo vs OKE. 1-2 week implementation.

Main app to Cloudflare: Don't. Payload CMS is incompatible, memory limits are too low, and OCI costs $0.

Revisit Q4 2026: If Payload CMS adds Workers support and CF raises memory limits, reconsider.