Cloudflare billing pitfalls thread
The author organizes Cloudflare billing risks by product and shares experience with budget alert emails.
- Products
- WorkersD1Durable ObjectsEmail SendingContainers
- Source
- Author experience𝕏
- Author
- yvonuk (@mcwangcn)
Key points
- The author covers D1, Durable Objects, Workers, Email Sending, and Containers in five numbered posts.
- The thread links billing risks to full-table writes, request and CPU usage, bot-triggered email, and separate container charges.
- A later post adds the author’s experience with delayed budget-alert emails. All collected nodes and their original text appear below.
Original sources
Original post
Read on 𝕏yvonuk
@mcwangcn · Original 𝕏 post
这个帖子今天得到很多关注,看得出大家对Cloudflare的账单计费很感兴趣,我就再写个串推说说Cloudflare比较容易爆账单的几个点,都是我自己交学费换来的血泪教训,可能并不全面,欢迎大家补充🧵 https://t.co/MrerzXCOJR
D1: the author warns that full-table UPDATE statements grow write volume as tables expand, especially when linked to requests.
Read on 𝕏yvonuk
@mcwangcn · Original 𝕏 post
1. Cloudflare D1 D1绝对称得上是CF账单杀手,我自己就被搞过上千刀。最大的坑是写入费用(每百万行1美元),如果你在workers里不注意sql用法,随便update all,当表格变大之后这个费用是很惊人的,尤其当数据库update与网络请求连在一起时更是分分钟爆单 pic.twitter.com/FvVKrYlnLf
Durable Objects: the author highlights database and request usage as separate billing concerns.
Read on 𝕏yvonuk
@mcwangcn · Original 𝕏 post
2. Cloudflare Durable Objects Durable Objects是另一个容易爆的点,因为它既有D1数据库的计费,又有Requests的计费,还能无限scale。好在DO本身也有点复杂,会去真正用它的地方也不多。
Workers: the author separates request charges from CPU-time charges and describes experience with CPU costs.
Read on 𝕏yvonuk
@mcwangcn · Original 𝕏 post
3. Workers Cloudflare Workers计费分两块:Requests和CPU time,这两部分都有可能爆单。比如@keking99最近的1000刀账单就主要来自海量Requests,而我自己之前则是被CPU time搞过。
Email Sending: the author describes bot sign-ups amplifying email usage on a magic-link login flow.
Read on 𝕏yvonuk
@mcwangcn · Original 𝕏 post
4. Email Cloudflare的Email Sending服务,好用且价格不贵,每月超过3000封的部分每1000封0.35美元。我个人比较喜欢用Email magic link作为登录方式,但也因此很容易被人滥用,比如我做的https://t.co/5OtLSlDoF8经常短时间内被几千个bot注册,光是Email费用就好几刀一天,不过这也是比较容易解决的。
Containers: the author explains that container charges are separate from the Workers Paid subscription and reports idle costs from a personal test.
Read on 𝕏yvonuk
@mcwangcn · Original 𝕏 post
5. Containers(完) Cloudflare的Containers也是很容易爆账单的服务,年初CF做了个在Containers里运行openclaw的demo,不少推友以为只需要$5/月的worker paid费用,其实还有Containers费用,我亲自测试每月啥都不干也需要30美元左右。Containers相当于CF的VPS,但比一般的VPS要贵多了,不建议使用。
Budget alerts: the author reports emails arriving hours or a day after unexpected usage.
Read on 𝕏yvonuk
@mcwangcn · Original 𝕏 post
关于Cloudflare的账单问题,再多说两句: 有网友说不想爆单可以在Cloudflare上设一个预警(Alert),超额就会收到Email提醒。 这没错,但是依旧有个漏洞:Cloudflare Alert发送都是有延迟的,我之前被爆单的Alert常常是晚了几小时或一天。 https://t.co/ip3t7fgHE6 pic.twitter.com/3un1SwuL9w
More to read
Community resourceWorkers +1
Cloudflare cost playbook
A community playbook for Cloudflare cost retrospectives, cost models, and code review.
D1
mcwangcn reports past D1 write charges of “over a thousand dollars.”
@mcwangcn says D1 writes previously cost over a thousand dollars and separately mentions Workers CPU charges without giving an amount.
Official docsAccount-wide usage-based products
Budget alerts
Cloudflare documents account-wide spend alerts and their notification limits.