On the free tier, keep large blobs out of D1 and KV: metadata in D1, hot keys in KV, bodies in R2
风易 (@Michael_liyang) recommends splitting storage by role on the free tier: D1 holds only metadata and references, KV only hot keys and short results, and files, images and long logs go to R2.
- Products
- D1KVR2
- Source
- Author experience𝕏 post
- Author
- 风易 (@Michael_liyang)
Key points
- His rule: D1 stores only metadata and references; KV stores only hot keys and short results; file, image and long-log bodies all go to R2.
- Write path: body to R2 → reference to D1 → hot data to KV. Read path: check KV first → on a miss read the reference from D1 → then fetch from R2.
- His reasoning: D1 and KV are metered by count and size, so putting large bodies there is "using the most expensive slot for the cheapest thing". In a related reply he notes D1 Free has 5 GB per account and 500 MB per database, so long logs belong in R2.
Original sources
Published
Original post
Read on 𝕏风易 (@Michael_liyang) recommends splitting storage by role on the free tier: D1 holds only metadata and references, KV only hot keys and short results, and files, images and long logs go to R2.
风易 | AI 工具链
@Michael_liyang · Original 𝕏 post
先说结论:免费档存数据先分家,大本体别塞 D1 和 KV。1 D1 只存元数据和引用;2 KV 只存热键和短结果;3 文件、图片、长日志本体全进 R2。链路:写入→本体进 R2→引用写 D1→热数据写 KV→读取先查 KV→未命中查 D1 拿引用→再拉 R2。判断:D1 和 KV 按条数和体积计费,塞大本体等于拿最贵的格子装最便宜的东西。
More to read
qianshuixia2026: D1 free row-read cap burned twice in one day, plus R2 and Workers pitfalls after the first paid orders
浅水虾 (@qianshuixia2026) published a 16 November 2026 X article after the first $12 and $29 orders. On 14 November a 10-minute cron full-table scan burned the D1 Free 5 million daily row-read cap in 2 hours 14 minutes; the same evening the author ran wrangler d1 execute --remote statistics that scanned about 4.08 million rows in 5 minutes and hit the cap again, then paid $5 to upgrade to Workers Paid. The article also covers an R2 multipart complete() customMetadata mismatch that failed a >24 MB export five times (50 credits sent as apology), 128 MB / 10 ms / 50-subrequest walls that a paid plan does not lift, and Queues’ 10,000 daily operations with three operations per delivered message.
Kun Save Point (@Savepoint_kk): a D1 bug rewrote unchanged data into a $2,739.12 bill; $2,141 goodwill credit granted.
Kun Save Point (@Savepoint_kk), an indie developer who says he recently lost his job, says a bug repeatedly rewrote unchanged data while inefficient queries amplified reads, producing a $2,739.12 Cloudflare bill already paid via PayPal (D1 rows written $2,641.00, rows read $64.06, other services $34.06); he says his bills were usually under $10 a month. Cloudflare granted a $2,141 goodwill account credit under case #02391058. He asks for it to be converted into a refund to the original PayPal payment, or at least for relief on the $2,641 write charges, and later writes that the initial request was declined and has been reopened for additional review. On October 25 he adds that he missed the only alert email Cloudflare sent, whose amount was not particularly high, and received no further warning before the large card charge; on October 26 he writes that the refund request to the original payment method is still under further review. On November 10 he posts a timeline saying that after following up on November 10–11, support again stated the $2,141 could only remain as account credit and the remaining $598.12 was still undecided while the ticket was being closed.
Six free allowances and four kinds of cost: estimating a Cloudflare bill line by line
Su (@Sukiea1008) lists six common Cloudflare free allowances and four kinds of cost — separately bought items, hard stops at free limits, metered usage on enabled services, and other services such as models and email — and walks through a PDF summariser to show why each line must be estimated in its own unit.