Cloudflare Workers vs Vercel OG 2026 — 10x Faster, 7x Cheaper
If you are choosing between Cloudflare Workers and Vercel OG (Satori) for your OG image generator, the marketing pages will not give you straight answers. This is a hands-on benchmark of both — cold start, p99, throughput, cost — across realistic loads.
The two approaches in one paragraph
Cloudflare Workers + SVG strings — concatenate an SVG template, return as image/svg+xml. No image library, no rasterization. Tiny bundle.
Vercel OG / Satori — render React JSX to SVG with Satori, optionally rasterize to PNG with resvg-wasm. Larger bundle, more flexible.
Test setup
- Workload: 10,000 OG image requests, randomized titles 30-90 chars, random templates
- Concurrency: 50 parallel requests
- From: Mumbai, ap-south region
- Tools: autocannon for load testing, vmstat for resource monitoring
Latency results
| Metric | CF Workers SVG | Vercel OG (PNG) | Vercel OG (SVG-only) |
|---|---|---|---|
| p50 | 11ms | 187ms | 94ms |
| p95 | 28ms | 312ms | 156ms |
| p99 | 54ms | 521ms | 241ms |
| Cold start | 22ms | 1,840ms | 1,420ms |
Cloudflare Workers SVG is 10-20x faster on every metric. The Satori library (a few hundred KB of WASM) has to be loaded and warmed; SVG concatenation is plain JavaScript.
Throughput
- CF Workers SVG: sustained 4,200 req/sec from a single Worker
- Vercel OG (PNG): ~340 req/sec before queueing
- Vercel OG (SVG): ~720 req/sec
For high-volume sites (1M+ shares/month), this matters. Vercel OG queues requests and you pay for compute time.
Cost per million requests
Both platforms have generous free tiers, but the per-unit economics diverge as you scale.
| Provider | Free tier | Cost per 1M (after free) | Compute time |
|---|---|---|---|
| Cloudflare Workers | 100K req/day free | $0.30 per 1M | Counts CPU only (10-20ms/req) |
| Vercel Edge Functions | 500K invocations/mo | $2.00 per 1M | Counts wall time (200ms/req) |
For 5M OG image requests per month, Cloudflare costs ~$1.50, Vercel costs ~$10.
Bundle size
| Stack | Compiled bundle |
|---|---|
| CF Workers SVG (raw) | ~12KB |
| CF Workers + Satori + resvg | ~3.2MB (just under Workers limit) |
| Vercel OG (Satori) | ~2.8MB |
The Workers free tier limits scripts to 1MB compressed; the paid tier allows 10MB. SVG-only approach uses 1% of the limit.
Output quality
Where Vercel OG wins:
- Pixel-perfect PNG output (vs SVG which some social platforms misrender)
- JSX flexibility — design with React
- Easy custom font loading
- Better text-fitting algorithm (Satori auto-shrinks)
Where SVG approach wins:
- Speed (10-20x faster)
- Cost (1/7th)
- Simplicity (no React, no rasterizer)
- Edge cache hit rate higher (smaller responses)
The hybrid approach
The pattern og.hjlabs.in uses: SVG-first for instant response, with optional ?format=png that rasterizes via Resvg-WASM only when needed. The vast majority of social platform crawlers accept SVG; only Facebook and iMessage occasionally need PNG.
When to choose Vercel OG
- You're already on Vercel and want zero new infrastructure
- You need pixel-perfect PNG output for Facebook reliability
- You have designers who want JSX-driven layouts
- You publish <500K OG images per month (cost is irrelevant)
When to choose Cloudflare Workers
- You publish 100K+ OG images per month and care about cost
- You need sub-50ms p99 (e.g., for crawler retries)
- You're already on Cloudflare
- You don't need designer-grade JSX flexibility — fixed templates are fine
The hosted middle path
Don't want to run either? Use a hosted service. og.hjlabs.in runs the Cloudflare Workers SVG approach for you — free, no signup, latency 10-30ms globally. The hosted route saves you the maintenance and gets you 90% of the value.
Bottom line
For raw performance and cost: Cloudflare Workers + SVG wins by 10x. For developer experience: Vercel OG wins for Next.js shops. For minimum-effort: a hosted service like og.hjlabs.in wins for everyone else. Pick based on your constraints, not the loudest marketing.
Generate your OG images and favicons
Free. URL-based API. Edge-cached. No signup.
Open the generator →