Google Cloud Run在6周内花费了我4676美元,但没有任何流量。
亲爱的HN,
我是一名独立开发者,目前还没有付费客户。为了在迭代一个副项目时获得更可预测的基础成本,我将我的项目从App Engine迁移到了Cloud Run。
我将我的设置、预算和限制作为背景信息输入到Gemini CLI中,要求它搜索官方文档和最佳实践,并按照这些指导进行操作。
我移除了–min-instances=1,期望自动扩展能够减少闲置开支。提交信息声称“节省了60%的成本”。但实际结果却是大约增加了1800%,当我用信用卡去买咖啡时,收到了意外的账单下降提示。
从11月2日到12月14日,Cloud Run的费用累计约为4676美元。期间没有流量激增,没有滥用行为,也没有应用程序错误。这些服务大部分时间都是闲置的。
问题在于:CPU和内存在早期实验中被过度配置(4个CPU,16Gi)。每次部署都会创建一个新的修订版本,而我在迭代过程中频繁部署。这些修订版本可能比预期的保持活跃时间更长。自动扩展加上修订版本的膨胀意味着即使没有流量,活跃资源也比直觉所预期的要多。
关于账单警报的失败:我在50美元时启用了警报。我收到了一个早期通知,但随着支出增加了另外4600美元,之后就没有任何消息了。没有明确的信号表明我的成本结构发生了实质性变化。
我联系了谷歌云账单支持,寻求明确的指导或部分减免。经过审核,他们拒绝了任何调整并关闭了案件。作为一名没有账户团队的独立开发者,我没有其他上诉途径,只能接受这些费用。
目前的情况是:在调整资源和清理修订版本膨胀后,我的每日费用从约200美元降到了账单仪表板上的5美元以下。我谨慎乐观,但不确定问题是否完全解决。
对于那些长期使用Cloud Run的开发者:作为独立开发者,你们是如何实际限制下行风险的?你们是否设定了严格的预算上限并接受停机?有没有避免修订版本膨胀的部署模式?在成本可预测性方面,App Engine是否仍然更可取?有哪些不依赖于持续手动账单检查的保护措施?
我并不是在追求规模。我只是想在独自开发的同时谨慎花钱。我很想听听其他人会有什么不同的做法。
查看原文
Dear HN,<p>I’m a solo operator with no paying customers yet. I wanted more predictable baseline costs while iterating on a side project, so I migrated from App Engine to Cloud Run.<p>I fed my setup, budget, and constraints as context into Gemini CLI, asked it to search official documentation and best practices, and followed that guidance.<p>I removed –min-instances=1, expecting autoscaling to reduce idle spend. The commit message claimed “60% cost savings.” The actual outcome was roughly an 1,800% increase and a surprise decline message when I went to buy coffee on my credit card.<p>From Nov 2 to Dec 14, Cloud Run accrued ~$4,676. There was no traffic spike, no abuse, no application bug. The services were mostly idle.<p>What compounded: CPU and memory were over-provisioned (4 CPU, 16Gi) from earlier experimentation. Each deploy created a new revision, and I deployed frequently while iterating. Those revisions must have stayed warm longer than expected. Autoscaling plus revision sprawl meant more active resources than intuition suggested, even without traffic.<p>The billing alert failure: I had alerts enabled at $50. I received one early notification, then silence as spend climbed another $4,600. There were no clear signals that my cost profile had materially changed.<p>I contacted Google Cloud Billing Support looking for clear guidance or partial relief. After review, they declined any adjustment and closed the case. As a solo dev without an account team, there was no escalation path beyond accepting the charges.<p>Where it stands now: After right-sizing resources and cleaning up revision sprawl, daily costs dropped from ~$200 to under $5 on my billing dashboard. I’m cautiously optimistic but not certain it’s fully resolved.<p>For those running Cloud Run longer term: How do you actually cap downside as a solo dev? Do you set hard budget caps and accept downtime? Are there deployment patterns that avoid revision sprawl? Is App Engine still preferable purely for cost predictability? What guardrails work that don’t depend on constant manual billing checks?<p>I wasn’t chasing scale. I was trying to be careful with money while building alone. I’d appreciate hearing what others would do differently.