The most expensive phrase in cloud: we'll clean it up later

The most expensive phrase in cloud: we’ll clean it up later

云基础设施中最昂贵的一句话是“我们以后再清理”。我在我合作过的每一个账户中都听到过这句话。一个开发环境为了一个冲刺周期(sprint)而创建。我们以后再清理。一个服务在启用了调试日志的情况下被部署。我们以后再调低它。一个数据库被配置得比当前需求大得多,因为配置不足的成本感觉比过度配置的成本风险更大。我们以后再调整它的大小。

Later never comes. Not because the team is irresponsible. Because later becomes now and now is always full. The sprint ends and the next sprint starts. The debug logging produces useful information once and now removing it feels risky. The database has been running for three months and suddenly changing it requires coordination and a maintenance window and it’s never the right week. The resource just keeps running. I’ve found dev environments running for 18 months that were created for a feature that shipped in week two.

“以后”永远不会到来。这并不是因为团队不负责任,而是因为“以后”变成了“现在”,而“现在”总是排得满满当当。冲刺周期结束了,下一个冲刺周期又开始了。调试日志只产生过一次有用的信息,现在删除它感觉有风险。数据库已经运行了三个月,突然更改它需要协调和维护窗口,而且永远找不到合适的一周。资源就这样一直运行着。我发现过一些运行了 18 个月的开发环境,它们最初只是为了一个在第二周就发布的功能而创建的。

The cost isn’t just the money. It’s the compounding weight of things you meant to do that you didn’t do. Every resource you know should be removed but haven’t removed adds cognitive overhead. Every time someone looks at the account they have to decide again whether this thing is safe to touch. That decision cost happens over and over.

成本不仅仅是金钱,还有那些你打算做却没做的事情所带来的累积负担。每一个你知道应该删除但尚未删除的资源都会增加认知负担。每次有人查看账户时,他们都必须再次决定这个东西是否可以安全触碰。这种决策成本会反复发生。

The pattern that actually works is not doing the cleanup later. It’s building cleanup into the creation. When you spin up a dev environment, set a termination date in the tags. Schedule a reminder. Make the cleanup part of the task, not an afterthought. When you enable verbose logging, create a ticket immediately to reduce log level before the service goes to production. That ticket sits in the backlog as a concrete reminder instead of a vague intention. When you provision infrastructure you might need to rightsize, set a calendar reminder for 30 days later to check utilization.

真正有效的方法不是以后再清理,而是将清理工作融入到创建过程中。当你启动一个开发环境时,在标签中设置一个终止日期。安排一个提醒。让清理成为任务的一部分,而不是事后的补救。当你启用详细日志记录时,立即创建一个工单,以便在服务投入生产之前降低日志级别。该工单会作为具体的提醒留在待办事项中,而不是一个模糊的意图。当你配置可能需要调整大小的基础设施时,设置一个 30 天后的日历提醒来检查利用率。

The discipline is not the cleanup. The discipline is treating the cleanup as part of the work when the work happens. Later is a cost you pay monthly until you do.

纪律不在于清理本身,而在于当工作发生时,将清理视为工作的一部分。只要你不去做,你每个月都要为“以后”支付成本。