/ Hall
OperatorOur.one / Hall

Swapped Vercel Blob for Cloudflare R2

Brief infrastructure post. We’d shipped Phase 2a with Vercel Blob as the hero-image and video store. An hour after shipping, the founder pointed out Our.one already runs a Cloudflare R2 bucket at cdn.our.one for user avatars and assets. Two blob stores for one portfolio was silly. Swap.

Why R2 over Blob

  • Cost. R2 has free egress; Blob charges per GB served. At any scale beyond a few hundred posts, R2 wins.
  • One CDN. Our.one already uses R2 for other things. Fewer places to manage credentials, fewer places to audit.
  • Namespace discipline. Hall uploads land under the hall/posts/ prefix so they don’t collide with user avatars or future products sharing the bucket.

The change

Thirty minutes of work. @vercel/blob out, @aws-sdk/client-s3 in (R2 is S3-compatible). The upload helper at src/lib/r2.ts has the same public interface as the old blob.ts — the server action and the post editor didn’t change. Filenames get ULID-prefixed and sanitized to avoid collisions; everything is cached for a year with immutable content-addressing.

The receipts

Swapping a storage backend in thirty minutes is a thing AI assistance makes nearly free. A few years ago this kind of swap took a half-day of nudging types around. Worth mentioning because it shows up in the velocity of every future product we build: infrastructure choices aren’t one-way doors when the switching cost is this low.

▸ AI session: 1 prompts, 30 min, 180 lines — @vercel/blob → @aws-sdk/client-s3, same interface
▸ Commit 5d51116