提供案例
billflare.

硬上限为何需要时间:Ashley Peacock 谈计费数据延迟

Cloudflare Durable Objects 团队的 Ashley Peacock(@ashleypeacock)从个人经验解释为何接近实时的费用上限难做,称硬性账单上限即将推出,并建议在此之前先配预算告警和问题告警。

适用产品
账号级用量计费产品Durable Objects
来源
作者经验𝕏
作者
Ashley Peacock(@ashleypeacock)

要点

  • 作者说明自己并不直接负责这项工作,只能根据经验和在内部看到的少量情况来谈。
  • 他写到计费通常是 OLAP 类负载:以他上次查看的 AWS 为例,当天花费要等第二天夜间任务生成数据后才能看到;他称这在大规模服务里很常见。
  • 他写到费用上限既需要接近实时的数据,也需要 OLTP 级别的支持;Cloudflare 开发者平台产品众多,计费系统要迁移,还要决定怎么封顶、在哪里封顶。他称这项工作已在进行,但不是能快速完成的事。
  • Cloudflare 当前 Budget alerts 文档写明:账号级用量费用越过阈值时,每个账期向收件人发一次邮件;提醒本身不会暂停或封顶用量。

原始来源

  1. 原始来源 · 发布

    到 𝕏 阅读

    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…
  2. 作者在 @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)
  3. 作者回复用户时建议先设预算告警,称不久后也能设置硬上限;并建议把 Workers 问题检测接到编程 agent 或 Slack。他补充说这类事件总体罕见,团队在努力进一步减少。

    到 𝕏 阅读

    Ashley Peacock

    @ashleypeacock · 𝕏 原帖

    I would set a budget alert: https://t.co/ySrAx2jq5H 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/z5u5q4JGOb up to your coding agents, so any anomalies or issues spotted get sent to them (or get a Slack message or…
  4. 有开发者回复称许多小开发者宁可要能直接停服的预算硬上限,作者回应称上限很快就会推出。

    到 𝕏 阅读

    Ashley Peacock

    @ashleypeacock · 𝕏 原帖

    They are coming very soon
作者经验Durable Objects +1

没人访问也能烧钱:先查闲置项目的后台任务与存储读写

@An_yhl 看完 @shmily7 的后续,决定翻查试完就扔的 AI 项目:先查后台定时任务与存储读写,不用的停掉而不只是关网页;账单提醒要开,但提醒不会替你停机。

Durable Objects

浮世绘:Durable Object alarm 死循环,报告账单 US$10,811.41。

@shmily7 报告无人使用的测试项目中 Durable Object alarm 陷入循环,后称为避免服务停用已全额支付 US$10,811.41。Cloudflare 人员 Ashley Peacock 公开回复称正在内部跟进,会再回复。Cloudflare 的 Dane Knecht 随后回复称他也已升级处理。10 月 9 日作者宣布事件结案:称在 Ashley Peacock 帮助下,Cloudflare 已决定全额退还 Bug 故障期间产生的费用,款项仍在等待到账,并附上收到的工单回复全文。

作者经验Workers +1

把 Workers 上 MCP Server 不必要的 Durable Objects 去掉

Justin(@interjc)介绍把只读 MCP Server 从每个会话起一个 Durable Object 的 McpAgent 换成无状态的 createMcpHandler,并分享一段审查 Workers 绑定与失控用量写法的提示词。