: Today1. Small changesets 4.
Changes behind ﬂags2. Engineers deploy 5. Copious graphs/metrics3. Deploys are fast 6. Fix fast & roll forward 7. Repeat 25+ times per day, every day
Then: 1. Weeks writing code
2. Painful merge 3. Hand oﬀ to deployers 4. Deploy, site down 5. Roll back deploy 6. Fix bugs, go to step 2Now: 1. Small changesets 2. Engineers deploy 3. Deploys are fast 4. Changes behind ﬂags 5. Copious graphs/metrics 6. Fix fast & roll forward
Etsy Deploy Stats: 2012• Deployed
to production 6,419 times• On average, 535/month, 25/day• Additional 3,851 conﬁg-only deploys• 196 diﬀerent people deployed to prod• Nov/Dec 2012: deployed 752 times
Continuous Deployment Math • N
= # of deploys • P = probability of site degradation • S = average severity of degradation • T = time to detect/resolve Expected = N*P*S*T Downtime
Continuous Deployment MathN = #
of deploys S = avg. severity of degradationP = prob. of degradation T = time to detect/resolve Before: Now: •N=1 • N = 250 ↑↑↑↑ • P = 0.5 • P = 0.1 ↓ • S = 0.7 • S = 0.05 ↓↓ • T = 100 • T = 5 ↓↓↓ E.D. = 35 E.D. = 6.25 (all numbers completely arbitrary)
Some Etsy Customizations In the
rare case we can’t continuously deploy, we create alternative tools: • Database schema changes • PCI-DSS environment (credit cards) We do continuously deploy as much of ourpayment processing as is safe & legal (98%).