Changing Tires on a Moving Car: A Journey to - - PDF document

changing tires on a moving car a journey to zero downtime
SMART_READER_LITE
LIVE PREVIEW

Changing Tires on a Moving Car: A Journey to - - PDF document

AT7 Agile/ DevOps Transformations Thursday, November 7th, 2019 10:00 AM Changing Tires on a Moving Car: A Journey to Zero-Downtime


slide-1
SLIDE 1

¡ ¡ AT7 ¡

Agile/ ¡DevOps ¡Transformations ¡ Thursday, ¡November ¡7th, ¡2019 ¡10:00 ¡AM ¡ ¡ ¡ ¡ ¡

Changing ¡Tires ¡on ¡a ¡Moving ¡Car: ¡A ¡ Journey ¡to ¡Zero-­‑Downtime ¡ Deployments ¡ ¡

Presented ¡by: ¡ ¡ ¡

¡ Pierre ¡Vincent ¡

¡ Poppulo ¡ ¡

Brought ¡to ¡you ¡by: ¡ ¡ ¡ ¡

¡

¡

¡ ¡ ¡

888-­‑-­‑-­‑268-­‑-­‑-­‑8770 ¡·√·√ ¡904-­‑-­‑-­‑278-­‑-­‑-­‑0524 ¡-­‑ ¡info@techwell.com ¡ ¡

https://agiledevopseast.techwell.com/ ¡

slide-2
SLIDE 2

¡ ¡ ¡ ¡ ¡

¡

Pierre ¡Vincent ¡

¡ Originally ¡from ¡a ¡software ¡development ¡background, ¡the ¡rise ¡of ¡DevOps ¡drove ¡ Pierre ¡Vincent ¡to ¡become ¡more ¡involved ¡in ¡how ¡systems ¡actually ¡run ¡in ¡the ¡real ¡ world ¡and ¡how ¡he ¡could ¡make ¡a ¡difference ¡helping ¡others ¡care ¡about ¡the ¡ applications ¡they ¡release ¡to ¡production. ¡Pierre ¡is ¡currently ¡an ¡infrastructure ¡and ¡ reliability ¡manager ¡at ¡Poppulo, ¡where ¡he's ¡responsible ¡for ¡the ¡continuous ¡delivery ¡ platform ¡and ¡the ¡operations ¡of ¡the ¡hybrid ¡on-­‑premises/cloud ¡infrastructure. ¡He ¡has ¡ given ¡talks ¡at ¡several ¡conferences ¡(O’Reilly ¡Velocity, ¡QCon ¡London) ¡in ¡the ¡space ¡of ¡ distributed ¡systems, ¡DevOps, ¡and ¡continuous ¡delivery. ¡ ¡

slide-3
SLIDE 3

@PierreVincent

Agile+DevOps East 2019 Changing tyres on a moving car

Changing tyres on a moving car

Our journey to zero-downtime deployments

November 7th, 2019 – Orlando, FL @PierreVincent pvincent.io @PierreVincent

Agile+DevOps East 2019 Changing tyres on a moving car
slide-4
SLIDE 4

@PierreVincent

Agile+DevOps East 2019 Changing tyres on a moving car

There has been a massive earthquake in New Zealand and I need to use Poppulo for regular updates. Please can you advise when it will be back online.

“ ”

– Poppulo customer

@PierreVincent

Agile+DevOps East 2019 Changing tyres on a moving car

Pierre Vincent

  • Infra. & Reliability Manager

@PierreVincent pvincent.io

slide-5
SLIDE 5

@PierreVincent

Agile+DevOps East 2019 Changing tyres on a moving car

2009 2015

Deploying 10+ times/day Zero downtime Deloy on-demand, anytime

Core Monolith

(est. 2007)

Microservices

(est. 2015)

Deploying every 3 to 6 months 4 hours downtime On Sunday at 5PM Deploying every 4 weeks 2 hours downtime On Sunday at 8PM

@PierreVincent

High-performing technology organisations deploy 46x more frequently than low-performing ones

Source: Accelerate - Dr. Nicole Forsgren

slide-6
SLIDE 6

@PierreVincent

How can we hope to achieve Continuous Delivery, when more frequent deploys means more downtime?

@PierreVincent

The “zero-downtime” elephant in the room... Why are we so afraid to try?

slide-7
SLIDE 7

@PierreVincent

Agile+DevOps East 2019 Changing tyres on a moving car

Mapping the deployment process, and its impact on users

@PierreVincent

Agile+DevOps East 2019 Changing tyres on a moving car

Run database migrations Enable maintenance mode Shut down services Upgrade services Start services Disable maintenance mode Wait for queued jobs to complete 15-60 mins 5-30 mins 15 mins

User impact

Limited functionality Downtime

Wait for services startup

Deployment steps

slide-8
SLIDE 8

@PierreVincent

Agile+DevOps East 2019 Changing tyres on a moving car

Keeping the application up and running while applying database schema migration

@PierreVincent

Agile+DevOps East 2019 Changing tyres on a moving car

Use expand/contract to split breaking changes Application [N] must work with schema [N+1]

Online database migration

Decouple schema version from application version No destructive operations to tables/columns in use Ensure backward compatibility with non-breaking changes only Detect changes likely to cause locking problems Limit impact to live traffic

slide-9
SLIDE 9

@PierreVincent

Agile+DevOps East 2019 Changing tyres on a moving car

Expand/Contract example

Create new column Write to both columns Migrate historical records Read from new column Remove

  • ld

column Release N+1 N+2 N+3

@PierreVincent

Agile+DevOps East 2019 Changing tyres on a moving car

More on schema migrations

Baron Schwartz - DevOps for the database Chapter: Loosening the Application/Database coupling

www.vividcortex.com/resources/devops-for-the-database-ebook

Michiel Rook - Database Schema Migrations with Zero Downtime

speakerdeck.com/mrook/database-schema-migrations-with-zero-downtim e-continuous-lifecycle-london-2019

slide-10
SLIDE 10

@PierreVincent

Agile+DevOps East 2019 Changing tyres on a moving car

Keeping the application up and running with rolling-upgrades

@PierreVincent

Agile+DevOps East 2019 Changing tyres on a moving car

Drain Stop Upgrade Start Up [N] Up [N+1] 1 2 Drain Stop Upgrade Start Up [N] Up [N+1]

Feature downtime

Drain Stop Upgrade Start Up [N] Up [N+1] 1 2 Drain Stop Upgrade Start Up [N] Up [N+1]

Feature continuously available Full upgrade Rolling upgrade

slide-11
SLIDE 11

@PierreVincent

Agile+DevOps East 2019 Changing tyres on a moving car

Focusing on operability to confidently run upgrades while serving live traffic

@PierreVincent

Agile+DevOps East 2019 Changing tyres on a moving car

Entire deployment pipeline in source control

+

Consistent and repeatable deployments No more manual operations

Any change is code-reviewed

✓ ✓

slide-12
SLIDE 12

@PierreVincent

Agile+DevOps East 2019 Changing tyres on a moving car

Observable deployments

Rolling-upgrade Progress Core healthchecks

Synthetic journey monitoring

✓ ✓

Error rates & queues saturation

@PierreVincent

Agile+DevOps East 2019 Changing tyres on a moving car

Deploying every 3 to 6 months 4 hours downtime On Sunday at 8PM

2009 2015 2019

Deploying every 4 weeks 2 hours downtime On Sunday at 8PM Deploying anytime Zero downtime During working hours

slide-13
SLIDE 13

@PierreVincent

Agile+DevOps East 2019 Changing tyres on a moving car

Zero-downtime deployments don’t mean everything stays up or that everything is immediately running the latest version.

Thank you!

@PierreVincent pvincent.io

They simply mean users don’t notice a thing while all this is happening.