InfraHosting 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
Infra
InfraCloudflare 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.
WebBun 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.
InfraCloudflare 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.
InfraVercel 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.
InfraCloudflare 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.
InfraUpstash 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.
InfraSupabase 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.
InfraSupabase 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.
WebEdge 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.
InfraCloudflare AI crawler allow list: GPTBot and ClaudeBot
Cloudflare blocks AI crawlers on new domains by default. The WAF rule, the robots.txt, and the checks that keep GPTBot and ClaudeBot reading your pages.
AI