
Hosting and infrastructure
Supabase, Cloudflare, Vercel and the runtimes under a SaaS. These notes cover what each one costs as the product grows, where each one wins, and when to move.
Start here


Cloudflare R2 bucket per tenant pays off for residency and deletion
R2 includes 100,000 buckets per account, then $0.10 each a month. When a bucket per tenant beats a shared prefix, and how to automate bucket setup at signup.
Cloudflare Workers AI vs the OpenAI API: where each wins
Workers AI bills $0.011 per 1,000 Neurons and runs on GPUs in over 180 cities. Here is where that beats a hosted API, and where it does not.
Bun vs Node in 2026: where each runtime wins in production
Bun 1.3 ships a full-stack runtime, Node 24 ships stable TypeScript and a test runner. We run Bun for installs and tests, Node for what serves traffic.
Cloudflare AI Gateway: caching, spend caps, dynamic routing
One URL in front of 24 native providers, with per-model cost logs, dollar spend caps and a cache you set from 60 seconds to a month. Core features are free.
Vercel vs Docker for Next.js: a $600 bill down to $90
A $600 Vercel bill drops to about $90 a month on a managed VPS with Docker. What you give up in edge, scaling and DX, and when the swap pays off.
Cloudflare R2 vs Supabase Storage: when to add R2 in 2026
You already run Supabase. Its Storage egress runs $0.03 to $0.09 per GB, R2 charges zero. Here is the line where adding Cloudflare R2 pays off in 2026.
Upstash Redis: 5 patterns for rate limiting, sessions, locks
Five production Upstash Redis patterns: rate limiting, sessions, cache-aside, distributed locks, and QStash queues, each with real cost math.
Supabase Supavisor: transaction mode, port 6543, 80ms cost
Transaction mode on port 6543 pools thousands of serverless connections, drops prepared statements and adds 30 to 80ms. When each mode is the right call.
Supabase RLS performance: 7 fixes for the 11x slowdown
Wrapping auth.uid() in a SELECT makes it run once per statement instead of once per row. Seven Supabase RLS patterns that stay fast on big tables.
Edge runtime vs Node runtime: Next.js 16 moved the default
Next.js 16 moved middleware to the Node runtime and renamed it proxy.ts. Where Edge still wins on latency, where Node wins on packages and long tasks.