硬上限为何需要时间:Ashley Peacock 谈计费数据延迟
Cloudflare Durable Objects 团队的 Ashley Peacock(@ashleypeacock)从个人经验解释为何接近实时的费用上限难做,称硬性账单上限即将推出,并建议在此之前先配预算告警和问题告警。
- 适用产品
- 账号级用量计费产品Durable Objects
- 来源
- 作者经验𝕏
- 作者
- Ashley Peacock(@ashleypeacock)
要点
- 作者说明自己并不直接负责这项工作,只能根据经验和在内部看到的少量情况来谈。
- 他写到计费通常是 OLAP 类负载:以他上次查看的 AWS 为例,当天花费要等第二天夜间任务生成数据后才能看到;他称这在大规模服务里很常见。
- 他写到费用上限既需要接近实时的数据,也需要 OLTP 级别的支持;Cloudflare 开发者平台产品众多,计费系统要迁移,还要决定怎么封顶、在哪里封顶。他称这项工作已在进行,但不是能快速完成的事。
- Cloudflare 当前 Budget alerts 文档写明:账号级用量费用越过阈值时,每个账期向收件人发一次邮件;提醒本身不会暂停或封顶用量。
原始来源
发布
原帖
到 𝕏 阅读Cloudflare Durable Objects 团队的 Ashley Peacock(@ashleypeacock)从个人经验解释为何接近实时的费用上限难做,称硬性账单上限即将推出,并建议在此之前先配预算告警和问题告警。
Ashley Peacock
@ashleypeacock · 𝕏 原帖
I’m not directly working on it, so I can only speak from experience + a little of what I’ve seen internally Billing is typically an OLAP workload, if you look at AWS (last time I checked), you can’t see what you’ve spent on the current day until the next day when an overnight job runs and generates the figures into a DB once a day. This is the norm for a lot of services, at least at meaningful scale. That means it’s simply not designed to be real-time, much less accessed by high throughput OLTP workloads Spending caps need both: real time (or close) and support for OLTP workloads. Further, Cloudflare’s dev platform has an array of products, so their billing needs to migrate + of course all the stuff needed at an OLTP level (how to cap, where to cap etc) So it has been in the works for a little bit, but the kind of work above is no quick win + takes time and consideration of how to approach
作者在 @shmily7 串文下的另一条回复中写到:硬性账单上限即将推出;他也在看 Durable Objects 侧还能做什么,但需要兼顾正当用例,并不简单。
到 𝕏 阅读Ashley Peacock
@ashleypeacock · 𝕏 原帖
Hard billing caps are coming soon, and I’m seeing if there’s more we can do on the DO side but it’s not straightforward to solve (e.g. there are legitimate use cases we need to account for)
作者回复用户时建议先设预算告警,称不久后也能设置硬上限;并建议把 Workers 问题检测接到编程 agent 或 Slack。他补充说这类事件总体罕见,团队在努力进一步减少。
到 𝕏 阅读Ashley Peacock
@ashleypeacock · 𝕏 原帖
I would set a budget alert: https://t.co/SEi98raqde as a starting point, you’ll be able to set a hard cap in the near future too. You can also hook https://t.co/4hNdjY4QLG up to your coding agents, so any anomalies or issues spotted get sent to them (or get a Slack message or something works too, then you can look yourself) It’s worth saying that while these things do happen from time to time, they are incredibly rare in the grand scheme of things and we’re working to reduces instances further
有开发者回复称许多小开发者宁可要能直接停服的预算硬上限,作者回应称上限很快就会推出。
到 𝕏 阅读Ashley Peacock
@ashleypeacock · 𝕏 原帖
They are coming very soon
其他推荐阅读
hontrandev:一次 Workers Free 的 D1 看板列表查询读取约 15,000 行以返回 58 行
2026-11-18,X 用户 @hontrandev 写道,Cloudflare 发邮件称,一个小型内部工单应用的 D1 已达到 Workers Free 每天 5 million 行读取限制的 78%。作者称有一条看板列表查询读取约 15,000 行以返回 58 行,并称已写下原因以及修复方法,回复中附有链接。这是 Free 每日上限上的用量警告,不是发票金额。
igorrizzom:一个被遗忘的 Durable Object 警报产生了 US$ 2,038 账单;支持退还 US$ 1,533.29,余下 US$ 505。
X 用户 @igorrizzom(Igor Rizzo)亦以 igorarm(urnaaovivo.com)在 Cloudflare 社区发帖,称一个收集巴西公开选举数据的个人、非商业原型在 October 25 决选后仍在运行。一个 Durable Object 通过警报每约 5 秒重新调度自身并写入 SQLite,发票达到 US$ 2,038,几乎全部来自写入的 DO 行,约 10k 次页面浏览。作者称已设置预算警报,但发到了一个从未查看的旧收件箱,且警报不会停止用量。Workers 和 Durable Objects 的支出限额直到 November 13 才宣布,当时几乎所有用量已经发生;作者随后设置了 US$ 1 的支出限额,关闭了收集器,并移除了 Cron Triggers。作者称支持以一次性善意退还了 US$ 1,533.29。余下 US$ 505(作者后来描述为 US$ 500 用量加上 US$ 5 Workers Paid 费用)被作为最终决定结案;作者在案例 #02442826(#02435308 的后续)中请求主管复核,并询问 @SidChatterjee 对于上线前案例是否仍有善意处理途径。公开 X 帖和社区帖中均没有 Cloudflare 员工回复。公开的支持处理由作者报告。
如比特:Spend Management 在 Billing → Spend limits 打开 Block usage;限额按订阅账期重置,通知邮箱要单独填,Durable Objects 暂停后存储费仍可能继续产生
2026-11-19,X 用户 @JustLikeBit(如比特)写了一组关于按量云服务被机器人刷出免费额度、以及 Cloudflare Spend Management 的说明。作者称入口在 Billing → Spend limits,选择 Workers 或 Durable Objects,设置限额并打开 Block usage;触线后自动拦截受支持的操作,而不只靠邮件提醒。续帖补充:限额按订阅账期重置,不一定是每月 1 号,例如续费日在 15 号就从 15 号算;想收到 80% 和 100% 阈值邮件,还要单独配置 notification_email,设置限额不会自动填通知邮箱;Durable Objects 暂停后,已有数据的存储费仍可能继续产生。作者附了官方说明链接。这些是作者对官方能力的复述与操作提醒,不是一张实际账单。