SlideShare une entreprise Scribd logo
1  sur  39
20 Minutes to
Production
Zero Downtime
Paul Payne
@paulrpayne
http://payne.io
Presentation code can be found at:
github.com/payneio/qcon-gtin.git
Photos from http://unsplash.com.
InfoQ.com: News & Community Site
• 750,000 unique visitors/month
• Published in 4 languages (English, Chinese, Japanese and Brazilian
Portuguese)
• Post content from our QCon conferences
• News 15-20 / week
• Articles 3-4 / week
• Presentations (videos) 12-15 / week
• Interviews 2-3 / week
• Books 1 / month
Watch the video with slide
synchronization on InfoQ.com!
http://www.infoq.com/presentations
/containerization-benefits
Presented at QCon New York
www.qconnewyork.com
Purpose of QCon
- to empower software development by facilitating the spread of
knowledge and innovation
Strategy
- practitioner-driven conference designed for YOU: influencers of
change and innovation in your teams
- speakers and topics driving the evolution and innovation
- connecting and catalyzing the influencers and innovators
Highlights
- attended by more than 12,000 delegates since 2007
- held in 9 cities worldwide
GTIN (bar code)
Product Lookup
Service
18 million products.
We need this change right
now!
0
Three Parts
1. Microservices Coding with confidence.
2. Containers Sensible units of deployment.
3. Deployment Patterns for zero downtime.
Part One
1. Microservices Coding with confidence.
2. Containers Sensible units of deployment.
3. Deployment Patterns for zero downtime.
Microservices
Single responsibility.
Minimal, easily understood code.
Loosely coupled.
Modular. Composable.
Maintain their own state.
Independently
deployable
functionality
=
µ
Microservice Quality Assurance
Liberal in what you accept. Conservative in
what you send (Robustness Principle).
Fast errors (compile time vs. run time).
Fast compile, build, test iterations.
TDD.
Confidence.
Demo
In which the presenter
demonstrates an update
to the microservice with
defensive coding
practices and fast build
and test steps with the
aid of Go.
Part Two
1. Microservices Coding with confidence.
2. Containers Sensible units of deployment.
3. Deployment Patterns for zero downtime.
Application Containers
“An application container is a way of packaging and executing processes on a
computer system that isolates the application from the underlying host
operating system” —https://github.com/appc/spec, 2015.
brought into the kernel...
namespaces
cgroups
SELinux
AppArmor
btrs/aufs/device mapper/etc
...
Various projects...
chroot (1979)
jail
Linux-VServer
OpenVZ
...
and packaged up.
systemd-nspawn
LXC
lmctfy
libvirt-lxc
Docker / libcontainer
rkt / appc
...
Virtualization Overhead
Bare Metal
Host OS (Linux)
Hypervisor
Guest OS
bins/libs
App A
Guest OS
bins/libs
App B
Bare Metal
Host OS (Linux)
Container Engine
bins/libs
App A
bins/libs
App B
VM Container
Better Hardware Utilization
Virtual Machines Containers
The Right Abstraction for Software
Immutable Infrastructure
Analogy from
Bill Baker, Microsoft
Microservices
Clean Org Interface (Reverse Conway’s Law)
Installing and configuring VMs.
Configuring app environments.
Creating, building and installing apps.
Making VM snapshots.
Installing OS updates.
Installing and configuring hardware.
Distributing VMs.
Monitoring and fixing hardware.
Working with devs on bad VMs.
Configuring app environments.
Creating, building and installing apps.
Installing and configuring hardware.
Distributing containers.
Monitoring and fixing hardware.
Rejecting bad containers.
The mythical
DevOPS unicorn
The DevOPS continuum
VMsContainers
OPSDev
Demo
$ make
In which the presenter demonstrates
the simple containerization of the
microservice using Docker and make.
Part Three
1. Microservices Coding with confidence.
2. Containers Sensible units of deployment.
3. Deployment Patterns for zero downtime.
The Datacenter as a Computer
Luiz Barroso & Urs Hölzle (2009).
http://doi.org/10.2200/S00516ED2V01Y201306CAC024
A Virtual Machine Detour on
the Cluster Scheduling Timeline
1999
VMWare
2003
Xen
2006
EC2
2009
Eucalyptus
2013
Docker
CoreOS
Mesos
Marathon
Google
Omega
LXC 0.9
2012
OpenStack
2014
Kubernetes
2009
Mesos
2015
Docker
Swarm
2003
Google
Borg
Late 1960s
Mainframe
Job Control
Multics
Burroughs
B5700
1977
ARCnet
1984
VAXcluster
2001
HP
Utility
Data
Center
1994
IBM S/390
Parallel
Sysplex
2006
cgroups
2008
LXC
namespaces
OpenVZ
jails
Solaris
zones
Cluster Schedulers, aka Microservice Platforms
docker + swarm + compose
DCOS
A Microservice Platform Pattern
Visible/Volatile/Persistent —Peter Gillardmoss, 2012
Phoenix servers —Martin Fowler, 2012
VISIBLE VOLATILE PERSISTENT
Live Deployment
Blue-Green
Deploy
Rolling
Deploy
Canary
Deploy
Jez Humble and David Farley (2010). Continuous Delivery: Reliable Software
Releases through Build, Test, and Deployment Automation, Addison-Wesley.
The General Deployment Story
VISIBLE VOLATILE
1
2
3
Public
Private
1
2
3
Demo
etcd
fleetctl
GTIN
GTIN
GTIN
Public
Private
In which the presenter demonstrates a
canary and rolling deploy with zero
downtime using CoreOS and Vulcand.
The Result
GTIN Win!
Other Reactions
“Wait! You’re not deploying to
production NOW are you??!”
“I think we found a bug in the
system.”
Three Parts
1. Microservices Coding with confidence.
2. Containers Sensible units of deployment.
3. Deployment Patterns for zero downtime.
Getting There
Part Four
(surprise!)
Infrastructure as Code
Quick reproducible infrastructure.
Entire Blue/Green stacks.
Cattle, not pets!
Deployment Manager
Google Cloud Platform Amazon Web Services
Terraform
Cross-platform
CloudFormation
Anti-Corruption Layers
Each service manages its own data;
ie. maintains its own table.
Integrate through interfaces, not
data stores!
Our canonical GTIN data is kept in a
commercial enterprise product.
We copy the data we need for our
service to Dynamo, syncing daily.
Wrap a proxy layer around the
entire enterprise application.
Route requests to your
microservices as you bring them
online.
Someday, none of your legacy app
will remain.
Application Strangler
http://martinfowler.com/bliki/StranglerApplication.html.
Image by http://journals.worldnomads.com/beckandphil.
Build to Learn
20 Minutes to
Production
Zero Downtime
Paul Payne
@paulrpayne
http://payne.io
Presentation code can be found at:
github.com/payneio/qcon-gtin.git
Photos from http://unsplash.com.
Watch the video with slide
synchronization on InfoQ.com!
http://www.infoq.com/presentations/
containerization-benefits

Contenu connexe

Plus de C4Media

Plus de C4Media (20)

Service Meshes- The Ultimate Guide
Service Meshes- The Ultimate GuideService Meshes- The Ultimate Guide
Service Meshes- The Ultimate Guide
 
Shifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDShifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CD
 
CI/CD for Machine Learning
CI/CD for Machine LearningCI/CD for Machine Learning
CI/CD for Machine Learning
 
Fault Tolerance at Speed
Fault Tolerance at SpeedFault Tolerance at Speed
Fault Tolerance at Speed
 
Architectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsArchitectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep Systems
 
ML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.js
 
Build Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerBuild Your Own WebAssembly Compiler
Build Your Own WebAssembly Compiler
 
User & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleUser & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix Scale
 
Scaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeScaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's Edge
 
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereMake Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home Everywhere
 
The Talk You've Been Await-ing For
The Talk You've Been Await-ing ForThe Talk You've Been Await-ing For
The Talk You've Been Await-ing For
 
Future of Data Engineering
Future of Data EngineeringFuture of Data Engineering
Future of Data Engineering
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
 
Navigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery TeamsNavigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery Teams
 
High Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in AdtechHigh Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in Adtech
 
Rust's Journey to Async/await
Rust's Journey to Async/awaitRust's Journey to Async/await
Rust's Journey to Async/await
 
Opportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven UtopiaOpportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven Utopia
 
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/DayDatadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
 
Are We Really Cloud-Native?
Are We Really Cloud-Native?Are We Really Cloud-Native?
Are We Really Cloud-Native?
 
CockroachDB: Architecture of a Geo-Distributed SQL Database
CockroachDB: Architecture of a Geo-Distributed SQL DatabaseCockroachDB: Architecture of a Geo-Distributed SQL Database
CockroachDB: Architecture of a Geo-Distributed SQL Database
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

20 Minutes from Ticket to Production. Zero Downtime.

  • 1. 20 Minutes to Production Zero Downtime Paul Payne @paulrpayne http://payne.io Presentation code can be found at: github.com/payneio/qcon-gtin.git Photos from http://unsplash.com.
  • 2. InfoQ.com: News & Community Site • 750,000 unique visitors/month • Published in 4 languages (English, Chinese, Japanese and Brazilian Portuguese) • Post content from our QCon conferences • News 15-20 / week • Articles 3-4 / week • Presentations (videos) 12-15 / week • Interviews 2-3 / week • Books 1 / month Watch the video with slide synchronization on InfoQ.com! http://www.infoq.com/presentations /containerization-benefits
  • 3. Presented at QCon New York www.qconnewyork.com Purpose of QCon - to empower software development by facilitating the spread of knowledge and innovation Strategy - practitioner-driven conference designed for YOU: influencers of change and innovation in your teams - speakers and topics driving the evolution and innovation - connecting and catalyzing the influencers and innovators Highlights - attended by more than 12,000 delegates since 2007 - held in 9 cities worldwide
  • 4.
  • 5. GTIN (bar code) Product Lookup Service 18 million products.
  • 6. We need this change right now! 0
  • 7. Three Parts 1. Microservices Coding with confidence. 2. Containers Sensible units of deployment. 3. Deployment Patterns for zero downtime.
  • 8. Part One 1. Microservices Coding with confidence. 2. Containers Sensible units of deployment. 3. Deployment Patterns for zero downtime.
  • 9. Microservices Single responsibility. Minimal, easily understood code. Loosely coupled. Modular. Composable. Maintain their own state. Independently deployable functionality = µ
  • 10. Microservice Quality Assurance Liberal in what you accept. Conservative in what you send (Robustness Principle). Fast errors (compile time vs. run time). Fast compile, build, test iterations. TDD. Confidence.
  • 11. Demo In which the presenter demonstrates an update to the microservice with defensive coding practices and fast build and test steps with the aid of Go.
  • 12. Part Two 1. Microservices Coding with confidence. 2. Containers Sensible units of deployment. 3. Deployment Patterns for zero downtime.
  • 13. Application Containers “An application container is a way of packaging and executing processes on a computer system that isolates the application from the underlying host operating system” —https://github.com/appc/spec, 2015. brought into the kernel... namespaces cgroups SELinux AppArmor btrs/aufs/device mapper/etc ... Various projects... chroot (1979) jail Linux-VServer OpenVZ ... and packaged up. systemd-nspawn LXC lmctfy libvirt-lxc Docker / libcontainer rkt / appc ...
  • 14. Virtualization Overhead Bare Metal Host OS (Linux) Hypervisor Guest OS bins/libs App A Guest OS bins/libs App B Bare Metal Host OS (Linux) Container Engine bins/libs App A bins/libs App B VM Container
  • 15. Better Hardware Utilization Virtual Machines Containers
  • 16. The Right Abstraction for Software
  • 17. Immutable Infrastructure Analogy from Bill Baker, Microsoft Microservices
  • 18. Clean Org Interface (Reverse Conway’s Law) Installing and configuring VMs. Configuring app environments. Creating, building and installing apps. Making VM snapshots. Installing OS updates. Installing and configuring hardware. Distributing VMs. Monitoring and fixing hardware. Working with devs on bad VMs. Configuring app environments. Creating, building and installing apps. Installing and configuring hardware. Distributing containers. Monitoring and fixing hardware. Rejecting bad containers. The mythical DevOPS unicorn The DevOPS continuum VMsContainers OPSDev
  • 19. Demo $ make In which the presenter demonstrates the simple containerization of the microservice using Docker and make.
  • 20. Part Three 1. Microservices Coding with confidence. 2. Containers Sensible units of deployment. 3. Deployment Patterns for zero downtime.
  • 21. The Datacenter as a Computer Luiz Barroso & Urs Hölzle (2009). http://doi.org/10.2200/S00516ED2V01Y201306CAC024
  • 22. A Virtual Machine Detour on the Cluster Scheduling Timeline 1999 VMWare 2003 Xen 2006 EC2 2009 Eucalyptus 2013 Docker CoreOS Mesos Marathon Google Omega LXC 0.9 2012 OpenStack 2014 Kubernetes 2009 Mesos 2015 Docker Swarm 2003 Google Borg Late 1960s Mainframe Job Control Multics Burroughs B5700 1977 ARCnet 1984 VAXcluster 2001 HP Utility Data Center 1994 IBM S/390 Parallel Sysplex 2006 cgroups 2008 LXC namespaces OpenVZ jails Solaris zones
  • 23. Cluster Schedulers, aka Microservice Platforms docker + swarm + compose DCOS
  • 24. A Microservice Platform Pattern Visible/Volatile/Persistent —Peter Gillardmoss, 2012 Phoenix servers —Martin Fowler, 2012 VISIBLE VOLATILE PERSISTENT
  • 25. Live Deployment Blue-Green Deploy Rolling Deploy Canary Deploy Jez Humble and David Farley (2010). Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation, Addison-Wesley.
  • 26. The General Deployment Story VISIBLE VOLATILE 1 2 3 Public Private 1 2 3
  • 27. Demo etcd fleetctl GTIN GTIN GTIN Public Private In which the presenter demonstrates a canary and rolling deploy with zero downtime using CoreOS and Vulcand.
  • 28.
  • 30. Other Reactions “Wait! You’re not deploying to production NOW are you??!” “I think we found a bug in the system.”
  • 31. Three Parts 1. Microservices Coding with confidence. 2. Containers Sensible units of deployment. 3. Deployment Patterns for zero downtime.
  • 33. Infrastructure as Code Quick reproducible infrastructure. Entire Blue/Green stacks. Cattle, not pets! Deployment Manager Google Cloud Platform Amazon Web Services Terraform Cross-platform CloudFormation
  • 34. Anti-Corruption Layers Each service manages its own data; ie. maintains its own table. Integrate through interfaces, not data stores! Our canonical GTIN data is kept in a commercial enterprise product. We copy the data we need for our service to Dynamo, syncing daily.
  • 35. Wrap a proxy layer around the entire enterprise application. Route requests to your microservices as you bring them online. Someday, none of your legacy app will remain. Application Strangler http://martinfowler.com/bliki/StranglerApplication.html. Image by http://journals.worldnomads.com/beckandphil.
  • 37. 20 Minutes to Production Zero Downtime Paul Payne @paulrpayne http://payne.io Presentation code can be found at: github.com/payneio/qcon-gtin.git Photos from http://unsplash.com.
  • 38.
  • 39. Watch the video with slide synchronization on InfoQ.com! http://www.infoq.com/presentations/ containerization-benefits