I highly, highly recommend a forced rotation of a week max, such that all deploys/hosts roll over on a weekly basis. For large clusters I recommend that nodes continuously churn so that there is always a rotation in progress.
I don't recommend this to paper over memory leaks -- you still need to fix those! But it results in tremendous stability.
That’s no panacea either. Some requests that can fail at runtime still need to succeed during bootstrapping and restarting during “low traffic periods” invites getting paged during low traffic periods.
I did all but the last mile on autoscaling work. I thought we needed about three months more work, the guys who took it over decided it needed to be done in time for year end performance reviews. They skipped things and also ignored my advice on tuning parameters. Twelve days later we had the worst outage in two years because they didn’t account for unknown unknowns while I did. A bug in Operations’ Terraform did not preserve current machine count during a redeploy, and their initial min cluster size was laughably small.
In my next 1:1 I told my boss it was worse than that because they held a vote to ignore my advice of ramping down instead of jumping to best case. My boss was as appalled as I had been. Fucking told you so.
By the time they had dialed it in they had exactly the settings that I proposed which they thought weren’t aggressive enough. The fact that my numbers were not that compelling is why it had been my priority 3 instead of Priority 1 in the first place. It didn’t actually save us all that much more money than I already had with the work up to that point.
Our reloadable config system needed Consul to be up and populated during bootstrapping. If it went down any time after that it would fall back gracefully to the last known configuration and exponentially back off. In situations like that, turning off a server for 20 minutes a day is an increase in risk with zero upside, since billing doesn’t even work that way!
At the end of the day I think I probably didn’t make enough of a stink about how much and for how long I had been working on that problem and how it was foolish to reassign it at that point in the process. At a minimum it should have been all three of us with me cross training.
Give a distributed computing problem to people with no formal training and they always ask how hard could this really be. Real hard, but also not if you commit to do some counterintuitive things religiously.
Thanks for sharing this. This is something i'll definitely implement moving forward.