提供案例
billflare.

Robert Chandler:一个 Durable Object 加 R2 撑起的同步引擎

Robert Chandler(@bertie_ai)测算:100 GB 数据、1000 个并发用户的实时同步负载,用一个从 R2 读取不可变 64 KB 页面的 Durable Object,约每月 9 美元;他按标价估算其他方案为 190 到 33,500 美元。所有数字均为作者估算,不是账单。

适用产品
Durable ObjectsR2
来源
作者经验𝕏
作者
Robert Chandler(@bertie_ai)

要点

  • 负载:100 GB、1000 个并发用户、每秒 5 次写入、每次写入实时推送。他按标价估算:Electric + Neon 约 190 美元,托管 Zero 约 410 美元,自建 Zero 约 870 美元,Firestore 约 4,700 美元,PowerSync 约 6,800 美元,Convex 约 27,000 美元,Supabase Realtime 约 33,500 美元;推送范围较小时为 190 到 2,100 美元。
  • 作者解释便宜的原因:数据以永不改变的 64 KB 页面存放在 R2,对象只拉取用户正在看的页面;他的 Hacker News 副本以 80 MB 缓存服务 46 GB 数据。每次写入只推送各视图中变化的行,他指出出站 WebSocket 消息不计费,所以推送是免费的。
  • 9 美元的来源:一次 30 秒压测(从笔记本发起 1000 个连接、都订阅同一个列表)按月放大。他列出的限制:查询须预先定义且各带索引;100 GB 数据离线构建,新写入暂留对象内(上限 10 GB);一个对象就是单区域单线程,没有副本。
  • 官方文档(2026-10-22 复核):Durable Objects 的出站 WebSocket 消息和入站协议 ping 不收费,入站消息按 20:1 折算请求计费;R2 标准存储每 GB-月 0.015 美元。

原始来源

  1. 发布

    Robert Chandler(@bertie_ai)测算:100 GB 数据、1000 个并发用户的实时同步负载,用一个从 R2 读取不可变 64 KB 页面的 Durable Object,约每月 9 美元;他按标价估算其他方案为 190 到 33,500 美元。所有数字均为作者估算,不是账单。

    Robert Chandler

    @bertie_ai · 𝕏 原帖

    supabase would charge ~$33,000/month to sync 100gb live to 1,000 concurrent users. convex ~$27,000 i'm doing it for $9 on one cloudflare durable object 🧵 https://t.co/xm7Qiwyhs3
  2. 串文:同一负载在各家的估价,对比一个 Durable Object 约 9 美元。

    到 𝕏 阅读

    Robert Chandler

    @bertie_ai · 𝕏 原帖

    same workload priced everywhere: 100gb, 1,000 concurrent users, 5 writes a second, every write pushed live electric + neon ~$190 hosted zero ~$410 self-hosted zero ~$870 firestore ~$4,700 powersync ~$6,800 convex ~$27,000 supabase realtime ~$33,500 one durable object: ~$9
  3. 串文:R2 中不可变的 64 KB 页面,每 GB-月 0.015 美元;对象只拉取被查看的页面。

    到 𝕏 阅读

    Robert Chandler

    @bertie_ai · 𝕏 原帖

    why it's so cheap: the data sits in R2 as 64kb pages that never change ($0.015/gb a month). the durable object only pulls in the pages people actually look at the hacker news copy serves 46gb with an 80mb cache and 7mb of engine memory
  4. 串文:1000 个标签页、每秒 5 次写入,送达 15 万次更新,中位延迟 174 毫秒;出站 WebSocket 消息不计费。

    到 𝕏 阅读

    Robert Chandler

    @bertie_ai · 𝕏 原帖

    the sync is the wild part. every list, thread and pixel on screen is a live query, and a write only pushes the rows that changed in each view 1,000 tabs, 5 writes/s: all 150,000 updates delivered, median 174ms. outgoing websocket messages aren't billed, so the fan-out is free https://t.co/JZ26MQJjxk
  5. 串文:受 r2db 启发,用编译为 Wasm 的 Rust 引擎重写,含同步层和四个在线应用。

    到 𝕏 阅读

    Robert Chandler

    @bertie_ai · 𝕏 原帖

    inspired by @tantaman's r2db, which proved this was possible at all: https://t.co/PIlmSOQAs0 i rebuilt it from scratch with claude code: a rust engine compiled to wasm, the sync layer and four live apps
  6. 串文:代码链接。

    到 𝕏 阅读

    Robert Chandler

    @bertie_ai · 𝕏 原帖

    code: https://t.co/xd3NOzq2Kx
  7. 串文:在线演示(2006 年以来的 Hacker News、r/place 2022、1.46 亿条纽约出租车行程)。

    到 𝕏 阅读

    Robert Chandler

    @bertie_ai · 𝕏 原帖

    they're all live, go break things: hacker news, every story and comment since 2006 (46gb): https://t.co/wdKCPYz6v5 r/place 2022, all 160m pixels: https://t.co/Owvge1zu19 146m nyc taxi trips as one spreadsheet: https://t.co/tQGncjvcos
  8. 串文:目前做不到的事——查询须预定义并带索引、离线构建且对象内新写入上限 10 GB、单区域无副本。

    到 𝕏 阅读

    Robert Chandler

    @bertie_ai · 𝕏 原帖

    what it can’t do (yet): - apps only run queries defined up front, each with an index. a new one means a rebuild - the 100gb is built offline. new writes stay in the object (10gb cap), folding them into R2 is next - one object = one thread in one region, no replicas
  9. 串文:9 美元由 30 秒压测按月放大得出;其他方案价格为他按标价的估算。

    到 𝕏 阅读

    Robert Chandler

    @bertie_ai · 𝕏 原帖

    and the numbers: - $9 is a 30s load test (1,000 sockets from my laptop, all watching one list) scaled to a month - competitor prices are my list-price estimates, every write sent to every user. with lighter fan-out they’re $190–2,100 all of it: https://t.co/uuQSi0nUwJ
作者经验Queues +3

经两个 Queues 按小时批处理遥测,把 R2 写入控制在每月约 720 次

B LLC 的文章交替使用两个 Cloudflare Queues,按 UTC 小时路由,并由每小时运行的消费者把每个批次压缩成一个 R2 对象。作者称,这样能把 R2 写入控制在每月约 720 次,处于免费的 100 万次 Class A 操作之内。

Durable Objects

neoblender13:AI agent 的递归 alarm 系统将 ~$10 的 Cloudflare 月账单变成 $1,500;获 $400 抵扣。

neoblender13 称 Cloudflare 账单通常每月约 $10,但本月因 AI agent 创建了递归 alarm 系统、使 Durable Objects 存储写入激增而收到 $1,500 账单,并称 Cloudflare 客服帮助不大。在后续回复中,作者称当时未意识到支出限额仅为告警,获得 $400 抵扣后仍需支付 $1,100,那一封告警邮件被淹没在收件箱中,现在有一个 Discord bot 每 12 小时报告一次费用。

作者经验Workers +5

别让小项目跑出大账单:Cloudflare 的四层费用防护

David Z(@davezfr)在 X 长文中面向 Vibe Coder,整理预算提醒、付费路径停止条件、自动暂停,以及由 personal agent 核实并暂停的四层防护。