Deploying Often Is a Very Good Idea
notes date: 2017-11-09
source date: 2017-05-02
- Goals with a web app
- ship stuff to the web
- avoid breaking production
- We can’t avoid breaking production
- At best, we are minimizing the time that production is broken
- num_deploys * P(break | deploy) * mean_time_to_fix
- note that all 3 variables can be manipulated, and aren’t orthogonal to one another
- P(break | deploy) and mean_time_to_fix both decrease as deploy frequency increases
- Risk increases with deploys that are infrequent
- Risk increases with deploys that are slow
- if deploy tools aren’t fast, people will take very dangerous shortcuts
- so you must make the safest way fast enough that there is no such temptation
- http://www.kampkrusty.altervista.org/img/Seasons/S10E13_13.png
- sometimes we also need to push on short notice
- in such a situation, you don’t want to be trying to use a poorly-exercised fast-path
- risk increases with time between coding and pushing
- Risk increases with number of lines pushed
- Debugging/review time decreases with the number of lines pushed
- Deploying often
- Minimizes the odds that the deploy tooling is broken
- Forces us to have fast deploys
- Minimizes the time it takes to fix something broken
- Amortizes the odds that the code is broken
- Means it’s more likely we understand what we’re deploying
- Reduces teh time to debug if something breaks