A Thank-You to Cloudflare

2 min read·497 words
Properties 5
titleA Thank-You to Cloudflare
tagslaunchgratitudecloudflareinfra
created2026-05-14
updated2026-05-14
id01KRKTDCZQR3RQPHT7S1A7XP0C

BrainShare runs entirely on Cloudflare's free tier. One Worker. One KV namespace. No Postgres, no Redis, no S3. That's not a cost-cutting shortcut, it's genuinely the right architecture for what BrainShare does. And I want to say that out loud because I don't think enough builders do.

Cloudflare KV is an underrated thing. Most people reach for Postgres by default, sometimes Redis on top of that, an S3 bucket for assets, and suddenly you're stitching together three infrastructure bills and a connection pool before you've shipped anything. KV looks almost too simple in comparison. Key-value store, eventually consistent, 1GB free. People see "eventually consistent" and assume it's a toy.

For BrainShare's access pattern it's the exact right fit. Every read is a direct key lookup, note:{ULID}, wrap:{id}, asset:{sha256}, canvas:{ULID}. You always know the key. Reads dwarf writes by orders of magnitude. And the eventual consistency tradeoff? Notes don't change mid-read. A reader in Tokyo and a reader in Berlin getting the same version of a note 200ms apart is not a problem. It's fine. The use case shapes the storage choice, and this one fits.

Free tier, actually free

100,000 KV reads per day, 1,000 writes per day, 1GB storage, at zero cost. Workers get 100,000 requests/day. For a personal publishing tool launching to real traffic, those numbers are serious. Most "free tiers" have escape hatches (a request size limit, a connection limit, a region restriction) that bite you the moment things get interesting. This one didn't.

The edge distribution is something I genuinely didn't have to think about. The KV namespace is global by default. I didn't configure replication. I didn't pick regions. A reader in Singapore just gets a fast response from the nearest Cloudflare data center, and I did nothing to make that happen. That's what infrastructure should feel like. The default is the right choice, not a trap.

Workers cold-start in single-digit milliseconds. There's no server sitting idle costing money, no autoscaling configuration to get wrong, no "warm instance" trick I need to know about. The whole backend deploys with wrangler deploy from the publisher/ folder. The wrangler config is 16 lines. Two secrets, one KV binding, done.

Honestly, I don't know if I used the best of Cloudflare here. I'm not using Durable Objects, I'm not using R2, I haven't touched their AI Gateway. But I do know I used KV well, and it carried the entire data layer of a real product without complaint. That's not nothing.

If you're building something where you always know the key, reads are the dominant operation, and you don't need transactions, stop reaching for Postgres out of habit. Give KV a real look.


See also: How BrainShare Works (Behind the Scenes)

A letter for my fellow viewers