SlideShare uma empresa Scribd logo
1 de 22
Baixar para ler offline
Implementing Rolling
Upgrades
Containerized Environment powered by Mesos, Marathon, Docker and HAProxy
1. Deploy NEW application (with a new App ID) with the minimum set of instances (eg: 1 in the beginning)
as needed to manage the traffic
2. Wait for the NEW instance(s) to go healthy
3. Add the NEW Instance(s) to the HAProxy Pool
4. Load gets balanced between OLD and NEW Pool
5. DISABLE one of the OLD instances in the HAProxy Pool
6. Wait for the HAProxy Connection to drain on the Disabled OLD Instance
7. After waiting period is over, Remove the Disabled OLD Instance by issuing Docker STOP on the
Container
8. Scale the NEW Instances and let them add to the HAProxy Pool
9. Repeat the steps 4 - 8 till all OLD instances are removed, and all the NEW instances are added to
HAProxy
10. Delete the OLD Application
ALGORITHM: Rolling Upgrades
OLD OLD OLD OLD OLD OLD
HAProxy
CURRENT STATUS
Old Instances are running and load balanced by HAProxy
OLD OLD OLD OLD OLD OLD
HAProxy
L4
DNS
Customer
Service Port 1
CURRENT STATUS
Old Instances are running and
load balanced by HAProxy
NEWOLD OLD OLD OLD OLD OLD
HAProxy
Minimum
required to
serve just
enough traffic
NEW INSTANCE DEPLOYED
1 Instance of the New Version of Application is deployed
NEWOLD OLD OLD OLD OLD OLD
HAProxy
NEW INSTANCE DEPLOYED
Health Check Passed
NEWOLD OLD OLD OLD OLD OLD
HAProxy
NEW INSTANCE DEPLOYED
Health Check Passed. Added to Load Balancer.
One Old Instance is DISABLED from Load Balancer
OLD OLD OLD OLD OLD OLD
HAProxy
L4
DNS
Customer
Service Port 1
NEW
NEW INSTANCE
DEPLOYED
Added to Load
Balancer. 16% new
requests goes to NEW
Instance.
No New Request will
go to Old Instance #1
disabled
NEWOLD OLD OLD OLD OLD OLD
HAProxy
ZDD
Control
Marathon
Mesos
Control
HOW IS
ROLLING
UPGRADE
IMPLEMENTED
ZDD requests HAProxy
to DISABLE one of the
OLD Instance
ZDD is a Python Script part of the Marathon-lb Project from Mesosphere
disabled
NEWOLD OLD OLD OLD OLD OLD
HAProxy
ZDD
Control
Marathon
Mesos
Control
HOW IS
ROLLING
UPGRADE
IMPLEMENTED
ZDD now waits for N
seconds to drain any
existing connections
N
seconds
NEWOLD OLD OLD OLD OLD OLD
HAProxyMesos
STOP
ZDD
Control
Marathon
Control
HOW IS
ROLLING
UPGRADE
IMPLEMENTED
After N seconds, ZDD
requests Marathon to
STOP one of the Old
Instances
NEWOLD OLD OLD OLD OLD OLD
HAProxyMesos
STOP
M
seconds
ZDD
Control
Marathon
Control
HOW IS
ROLLING
UPGRADE
IMPLEMENTED
Mesos invokes Docker
STOP on the Old
Container, and waits
for M seconds
NEWOLD OLD OLD OLD OLD
HAProxyMesos
M
seconds
STOP
N
seconds
OLD
NEW NEWOLD OLD OLD OLD OLD
HAProxyMesos
M
seconds
STOP
N
seconds
NEW NEWOLD OLD OLD OLD
HAProxy
M
seconds
Mesos
STOP
NEW
N
seconds
NEW NEWOLD OLD OLD
HAProxy
M
seconds
Mesos
STOP
NEWNEW
N
seconds
NEW NEWOLD OLD
HAProxy
M
seconds
Mesos
STOP
NEWNEWNEW
N
seconds
NEW NEWOLD
HAProxy
M
seconds
Mesos
STOP
NEWNEWNEWNEW
N
seconds
NEW NEW
HAProxyMesos
NEWNEWNEWNEWNEW
NEW NEW
HAProxyMesos
NEWNEWNEWNEWNEW
ROLLING UPGRADE COMPLETE !
NEW NEW
HAProxy
NEWNEWNEWNEW
L4
DNS
Customer
HOW IS
ROLLING
UPGRADE
IMPLEMENTED
Now all NEW Instances
have been added to
HAProxy Pool
APP APP APP APP APP APP
HAProxy
ZDD
Control
Marathon
Mesos
Control
DEV TEST STAGING PROD JENKINS
PIPELINE
ROLLING
UPGRADES
HAPPEN ACROSS
ALL ENVIRONMENT
ZDD orchestrates
the deployment

Mais conteúdo relacionado

Destaque

How do you implement Continuous Delivery? Part 4: Automated Testing
How do you implement Continuous Delivery? Part 4: Automated TestingHow do you implement Continuous Delivery? Part 4: Automated Testing
How do you implement Continuous Delivery? Part 4: Automated TestingThoughtworks
 
How do you implement Continuous Delivery? Part 2: Code Management
How do you implement Continuous Delivery? Part 2: Code ManagementHow do you implement Continuous Delivery? Part 2: Code Management
How do you implement Continuous Delivery? Part 2: Code ManagementThoughtworks
 
How do you implement Continuous Delivery?: Part 5 - Deployment Patterns
How do you implement Continuous Delivery?: Part 5 - Deployment PatternsHow do you implement Continuous Delivery?: Part 5 - Deployment Patterns
How do you implement Continuous Delivery?: Part 5 - Deployment PatternsThoughtworks
 
Continuous Delivery and Zero Downtime
Continuous Delivery and Zero DowntimeContinuous Delivery and Zero Downtime
Continuous Delivery and Zero DowntimeAxel Fontaine
 
Zero-Downtime Gerrit Code Review Upgrade
Zero-Downtime Gerrit Code Review UpgradeZero-Downtime Gerrit Code Review Upgrade
Zero-Downtime Gerrit Code Review UpgradeLuca Milanesio
 
Deploying and releasing applications
Deploying and releasing applicationsDeploying and releasing applications
Deploying and releasing applicationsMa Xuebin
 
Deploying Docker Containers at Scale with Mesos and Marathon
Deploying Docker Containers at Scale with Mesos and MarathonDeploying Docker Containers at Scale with Mesos and Marathon
Deploying Docker Containers at Scale with Mesos and MarathonDiscover Pinterest
 
Highly efficient container orchestration and continuous delivery with DC/OS a...
Highly efficient container orchestration and continuous delivery with DC/OS a...Highly efficient container orchestration and continuous delivery with DC/OS a...
Highly efficient container orchestration and continuous delivery with DC/OS a...Christian Bogeberg
 
How do you implement Continuous Delivery? Part 1
How do you implement Continuous Delivery? Part 1How do you implement Continuous Delivery? Part 1
How do you implement Continuous Delivery? Part 1Thoughtworks
 
Continuous delivery with Jenkins, Docker and Mesos/Marathon - jbcnconf
Continuous delivery with Jenkins, Docker and Mesos/Marathon - jbcnconfContinuous delivery with Jenkins, Docker and Mesos/Marathon - jbcnconf
Continuous delivery with Jenkins, Docker and Mesos/Marathon - jbcnconfJulia Mateo
 
Software Deployment Principles & Practices
Software Deployment Principles & PracticesSoftware Deployment Principles & Practices
Software Deployment Principles & PracticesThyagarajan Krishnan
 
Saksham Sarode - Building Effective test Data Management in Distributed Envir...
Saksham Sarode - Building Effective test Data Management in Distributed Envir...Saksham Sarode - Building Effective test Data Management in Distributed Envir...
Saksham Sarode - Building Effective test Data Management in Distributed Envir...TEST Huddle
 
Gerrit Code Review Analytics
Gerrit Code Review AnalyticsGerrit Code Review Analytics
Gerrit Code Review AnalyticsLuca Milanesio
 
Zero Downtime Deployment with Ansible
Zero Downtime Deployment with AnsibleZero Downtime Deployment with Ansible
Zero Downtime Deployment with AnsibleStein Inge Morisbak
 

Destaque (16)

How do you implement Continuous Delivery? Part 4: Automated Testing
How do you implement Continuous Delivery? Part 4: Automated TestingHow do you implement Continuous Delivery? Part 4: Automated Testing
How do you implement Continuous Delivery? Part 4: Automated Testing
 
How do you implement Continuous Delivery? Part 2: Code Management
How do you implement Continuous Delivery? Part 2: Code ManagementHow do you implement Continuous Delivery? Part 2: Code Management
How do you implement Continuous Delivery? Part 2: Code Management
 
How do you implement Continuous Delivery?: Part 5 - Deployment Patterns
How do you implement Continuous Delivery?: Part 5 - Deployment PatternsHow do you implement Continuous Delivery?: Part 5 - Deployment Patterns
How do you implement Continuous Delivery?: Part 5 - Deployment Patterns
 
Continuous Delivery and Zero Downtime
Continuous Delivery and Zero DowntimeContinuous Delivery and Zero Downtime
Continuous Delivery and Zero Downtime
 
Zero-Downtime Gerrit Code Review Upgrade
Zero-Downtime Gerrit Code Review UpgradeZero-Downtime Gerrit Code Review Upgrade
Zero-Downtime Gerrit Code Review Upgrade
 
Deploying and releasing applications
Deploying and releasing applicationsDeploying and releasing applications
Deploying and releasing applications
 
Deploying Docker Containers at Scale with Mesos and Marathon
Deploying Docker Containers at Scale with Mesos and MarathonDeploying Docker Containers at Scale with Mesos and Marathon
Deploying Docker Containers at Scale with Mesos and Marathon
 
Highly efficient container orchestration and continuous delivery with DC/OS a...
Highly efficient container orchestration and continuous delivery with DC/OS a...Highly efficient container orchestration and continuous delivery with DC/OS a...
Highly efficient container orchestration and continuous delivery with DC/OS a...
 
How do you implement Continuous Delivery? Part 1
How do you implement Continuous Delivery? Part 1How do you implement Continuous Delivery? Part 1
How do you implement Continuous Delivery? Part 1
 
Continuous delivery with Jenkins, Docker and Mesos/Marathon - jbcnconf
Continuous delivery with Jenkins, Docker and Mesos/Marathon - jbcnconfContinuous delivery with Jenkins, Docker and Mesos/Marathon - jbcnconf
Continuous delivery with Jenkins, Docker and Mesos/Marathon - jbcnconf
 
Software Deployment Principles & Practices
Software Deployment Principles & PracticesSoftware Deployment Principles & Practices
Software Deployment Principles & Practices
 
Saksham Sarode - Building Effective test Data Management in Distributed Envir...
Saksham Sarode - Building Effective test Data Management in Distributed Envir...Saksham Sarode - Building Effective test Data Management in Distributed Envir...
Saksham Sarode - Building Effective test Data Management in Distributed Envir...
 
Software engineering
Software engineeringSoftware engineering
Software engineering
 
Gerrit Code Review Analytics
Gerrit Code Review AnalyticsGerrit Code Review Analytics
Gerrit Code Review Analytics
 
Zero Downtime Deployment with Ansible
Zero Downtime Deployment with AnsibleZero Downtime Deployment with Ansible
Zero Downtime Deployment with Ansible
 
Liuping
LiupingLiuping
Liuping
 

Semelhante a Implementing Rolling Upgrades using Mesos, Marathon, Docker, HAProxy

The Glue is the Hard Part: Making a Production-Ready PaaS
The Glue is the Hard Part: Making a Production-Ready PaaSThe Glue is the Hard Part: Making a Production-Ready PaaS
The Glue is the Hard Part: Making a Production-Ready PaaSEvanKrall
 
DockerCon EU 2015: The Glue is the Hard Part: Making a Production-Ready PaaS
DockerCon EU 2015: The Glue is the Hard Part: Making a Production-Ready PaaSDockerCon EU 2015: The Glue is the Hard Part: Making a Production-Ready PaaS
DockerCon EU 2015: The Glue is the Hard Part: Making a Production-Ready PaaSDocker, Inc.
 
Deployment model Rolling upgrade deployment
Deployment model Rolling upgrade deploymentDeployment model Rolling upgrade deployment
Deployment model Rolling upgrade deploymentjeetendra mandal
 
High Availability for OpenStack
High Availability for OpenStackHigh Availability for OpenStack
High Availability for OpenStackKamesh Pemmaraju
 
Discover Kafka on OpenShift: Processing Real-Time Financial Events at Scale (...
Discover Kafka on OpenShift: Processing Real-Time Financial Events at Scale (...Discover Kafka on OpenShift: Processing Real-Time Financial Events at Scale (...
Discover Kafka on OpenShift: Processing Real-Time Financial Events at Scale (...confluent
 
Load Balancing with HAproxy
Load Balancing with HAproxyLoad Balancing with HAproxy
Load Balancing with HAproxyBrendan Jennings
 
Talend openstudio bigdata_gettingstarted_6.3.0_en
Talend openstudio bigdata_gettingstarted_6.3.0_enTalend openstudio bigdata_gettingstarted_6.3.0_en
Talend openstudio bigdata_gettingstarted_6.3.0_enManoj Sharma
 
Build Real-Time Streaming ETL Pipelines With Akka Streams, Alpakka And Apache...
Build Real-Time Streaming ETL Pipelines With Akka Streams, Alpakka And Apache...Build Real-Time Streaming ETL Pipelines With Akka Streams, Alpakka And Apache...
Build Real-Time Streaming ETL Pipelines With Akka Streams, Alpakka And Apache...Lightbend
 
Introduction to Offline Progressive Web Applications
Introduction to Offline Progressive Web ApplicationsIntroduction to Offline Progressive Web Applications
Introduction to Offline Progressive Web ApplicationsIlia Idakiev
 
Introduction to Reactive Microservices Architecture.
Introduction to Reactive Microservices Architecture.Introduction to Reactive Microservices Architecture.
Introduction to Reactive Microservices Architecture.Richard Langlois P. Eng.
 
Alibaba Cloud Conference 2016 - Docker Enterprise
Alibaba Cloud Conference   2016 - Docker EnterpriseAlibaba Cloud Conference   2016 - Docker Enterprise
Alibaba Cloud Conference 2016 - Docker EnterpriseJohn Willis
 
Deep Dive with Amazon EC2 Container Service Hands-on Workshop
Deep Dive with Amazon EC2 Container Service Hands-on WorkshopDeep Dive with Amazon EC2 Container Service Hands-on Workshop
Deep Dive with Amazon EC2 Container Service Hands-on WorkshopAmazon Web Services
 
Dataworks Berlin Summit 18' - Apache hadoop YARN State Of The Union
Dataworks Berlin Summit 18' - Apache hadoop YARN State Of The UnionDataworks Berlin Summit 18' - Apache hadoop YARN State Of The Union
Dataworks Berlin Summit 18' - Apache hadoop YARN State Of The UnionWangda Tan
 
Apache Hadoop YARN: state of the union
Apache Hadoop YARN: state of the unionApache Hadoop YARN: state of the union
Apache Hadoop YARN: state of the unionDataWorks Summit
 
Docker Workshop - Orchestrating Docker Containers
Docker Workshop - Orchestrating Docker ContainersDocker Workshop - Orchestrating Docker Containers
Docker Workshop - Orchestrating Docker ContainersHugo Henley
 
Introduction to ActiveMQ Apollo
Introduction to ActiveMQ ApolloIntroduction to ActiveMQ Apollo
Introduction to ActiveMQ Apollodejanb
 
OpenStack & OVS: From Love-Hate Relationship to Match Made in Heaven - Erez C...
OpenStack & OVS: From Love-Hate Relationship to Match Made in Heaven - Erez C...OpenStack & OVS: From Love-Hate Relationship to Match Made in Heaven - Erez C...
OpenStack & OVS: From Love-Hate Relationship to Match Made in Heaven - Erez C...Cloud Native Day Tel Aviv
 
Scaling and Embracing Failure: Clustering Docker with Mesos
Scaling and Embracing Failure: Clustering Docker with MesosScaling and Embracing Failure: Clustering Docker with Mesos
Scaling and Embracing Failure: Clustering Docker with MesosRob Gulewich
 

Semelhante a Implementing Rolling Upgrades using Mesos, Marathon, Docker, HAProxy (20)

The Glue is the Hard Part: Making a Production-Ready PaaS
The Glue is the Hard Part: Making a Production-Ready PaaSThe Glue is the Hard Part: Making a Production-Ready PaaS
The Glue is the Hard Part: Making a Production-Ready PaaS
 
DockerCon EU 2015: The Glue is the Hard Part: Making a Production-Ready PaaS
DockerCon EU 2015: The Glue is the Hard Part: Making a Production-Ready PaaSDockerCon EU 2015: The Glue is the Hard Part: Making a Production-Ready PaaS
DockerCon EU 2015: The Glue is the Hard Part: Making a Production-Ready PaaS
 
Deployment model Rolling upgrade deployment
Deployment model Rolling upgrade deploymentDeployment model Rolling upgrade deployment
Deployment model Rolling upgrade deployment
 
High Availability for OpenStack
High Availability for OpenStackHigh Availability for OpenStack
High Availability for OpenStack
 
Discover Kafka on OpenShift: Processing Real-Time Financial Events at Scale (...
Discover Kafka on OpenShift: Processing Real-Time Financial Events at Scale (...Discover Kafka on OpenShift: Processing Real-Time Financial Events at Scale (...
Discover Kafka on OpenShift: Processing Real-Time Financial Events at Scale (...
 
Running Services on YARN
Running Services on YARNRunning Services on YARN
Running Services on YARN
 
Load Balancing with HAproxy
Load Balancing with HAproxyLoad Balancing with HAproxy
Load Balancing with HAproxy
 
Hoya for Code Review
Hoya for Code ReviewHoya for Code Review
Hoya for Code Review
 
Talend openstudio bigdata_gettingstarted_6.3.0_en
Talend openstudio bigdata_gettingstarted_6.3.0_enTalend openstudio bigdata_gettingstarted_6.3.0_en
Talend openstudio bigdata_gettingstarted_6.3.0_en
 
Build Real-Time Streaming ETL Pipelines With Akka Streams, Alpakka And Apache...
Build Real-Time Streaming ETL Pipelines With Akka Streams, Alpakka And Apache...Build Real-Time Streaming ETL Pipelines With Akka Streams, Alpakka And Apache...
Build Real-Time Streaming ETL Pipelines With Akka Streams, Alpakka And Apache...
 
Introduction to Offline Progressive Web Applications
Introduction to Offline Progressive Web ApplicationsIntroduction to Offline Progressive Web Applications
Introduction to Offline Progressive Web Applications
 
Introduction to Reactive Microservices Architecture.
Introduction to Reactive Microservices Architecture.Introduction to Reactive Microservices Architecture.
Introduction to Reactive Microservices Architecture.
 
Alibaba Cloud Conference 2016 - Docker Enterprise
Alibaba Cloud Conference   2016 - Docker EnterpriseAlibaba Cloud Conference   2016 - Docker Enterprise
Alibaba Cloud Conference 2016 - Docker Enterprise
 
Deep Dive with Amazon EC2 Container Service Hands-on Workshop
Deep Dive with Amazon EC2 Container Service Hands-on WorkshopDeep Dive with Amazon EC2 Container Service Hands-on Workshop
Deep Dive with Amazon EC2 Container Service Hands-on Workshop
 
Dataworks Berlin Summit 18' - Apache hadoop YARN State Of The Union
Dataworks Berlin Summit 18' - Apache hadoop YARN State Of The UnionDataworks Berlin Summit 18' - Apache hadoop YARN State Of The Union
Dataworks Berlin Summit 18' - Apache hadoop YARN State Of The Union
 
Apache Hadoop YARN: state of the union
Apache Hadoop YARN: state of the unionApache Hadoop YARN: state of the union
Apache Hadoop YARN: state of the union
 
Docker Workshop - Orchestrating Docker Containers
Docker Workshop - Orchestrating Docker ContainersDocker Workshop - Orchestrating Docker Containers
Docker Workshop - Orchestrating Docker Containers
 
Introduction to ActiveMQ Apollo
Introduction to ActiveMQ ApolloIntroduction to ActiveMQ Apollo
Introduction to ActiveMQ Apollo
 
OpenStack & OVS: From Love-Hate Relationship to Match Made in Heaven - Erez C...
OpenStack & OVS: From Love-Hate Relationship to Match Made in Heaven - Erez C...OpenStack & OVS: From Love-Hate Relationship to Match Made in Heaven - Erez C...
OpenStack & OVS: From Love-Hate Relationship to Match Made in Heaven - Erez C...
 
Scaling and Embracing Failure: Clustering Docker with Mesos
Scaling and Embracing Failure: Clustering Docker with MesosScaling and Embracing Failure: Clustering Docker with Mesos
Scaling and Embracing Failure: Clustering Docker with Mesos
 

Mais de Vivek Juneja

Containers in Production at GS Shop
Containers in Production at GS ShopContainers in Production at GS Shop
Containers in Production at GS ShopVivek Juneja
 
MesosCon_Asia_2016_DevOps_at_GSShop
MesosCon_Asia_2016_DevOps_at_GSShopMesosCon_Asia_2016_DevOps_at_GSShop
MesosCon_Asia_2016_DevOps_at_GSShopVivek Juneja
 
Introduction_to_AntiFragile
Introduction_to_AntiFragileIntroduction_to_AntiFragile
Introduction_to_AntiFragileVivek Juneja
 
scalable backend services at mobile developer summit
scalable backend services at mobile developer summitscalable backend services at mobile developer summit
scalable backend services at mobile developer summitVivek Juneja
 
Bringing clouds together : the future of cloud services
Bringing clouds together : the future of cloud servicesBringing clouds together : the future of cloud services
Bringing clouds together : the future of cloud servicesVivek Juneja
 
Don't Just Present, Enchant !
Don't Just Present, Enchant !Don't Just Present, Enchant !
Don't Just Present, Enchant !Vivek Juneja
 
Humanize the android
Humanize the androidHumanize the android
Humanize the androidVivek Juneja
 
Secrets of presentation zen
Secrets of presentation zenSecrets of presentation zen
Secrets of presentation zenVivek Juneja
 
The beauty of virtualization
The beauty of virtualizationThe beauty of virtualization
The beauty of virtualizationVivek Juneja
 

Mais de Vivek Juneja (9)

Containers in Production at GS Shop
Containers in Production at GS ShopContainers in Production at GS Shop
Containers in Production at GS Shop
 
MesosCon_Asia_2016_DevOps_at_GSShop
MesosCon_Asia_2016_DevOps_at_GSShopMesosCon_Asia_2016_DevOps_at_GSShop
MesosCon_Asia_2016_DevOps_at_GSShop
 
Introduction_to_AntiFragile
Introduction_to_AntiFragileIntroduction_to_AntiFragile
Introduction_to_AntiFragile
 
scalable backend services at mobile developer summit
scalable backend services at mobile developer summitscalable backend services at mobile developer summit
scalable backend services at mobile developer summit
 
Bringing clouds together : the future of cloud services
Bringing clouds together : the future of cloud servicesBringing clouds together : the future of cloud services
Bringing clouds together : the future of cloud services
 
Don't Just Present, Enchant !
Don't Just Present, Enchant !Don't Just Present, Enchant !
Don't Just Present, Enchant !
 
Humanize the android
Humanize the androidHumanize the android
Humanize the android
 
Secrets of presentation zen
Secrets of presentation zenSecrets of presentation zen
Secrets of presentation zen
 
The beauty of virtualization
The beauty of virtualizationThe beauty of virtualization
The beauty of virtualization
 

Último

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
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...Drew Madelung
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
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 organizationRadu Cotescu
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
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 WorkerThousandEyes
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
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 2024Rafal Los
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
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)wesley chun
 
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 DevelopmentsTrustArc
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 

Último (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
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...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
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
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
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
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
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)
 
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
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

Implementing Rolling Upgrades using Mesos, Marathon, Docker, HAProxy

  • 1. Implementing Rolling Upgrades Containerized Environment powered by Mesos, Marathon, Docker and HAProxy
  • 2. 1. Deploy NEW application (with a new App ID) with the minimum set of instances (eg: 1 in the beginning) as needed to manage the traffic 2. Wait for the NEW instance(s) to go healthy 3. Add the NEW Instance(s) to the HAProxy Pool 4. Load gets balanced between OLD and NEW Pool 5. DISABLE one of the OLD instances in the HAProxy Pool 6. Wait for the HAProxy Connection to drain on the Disabled OLD Instance 7. After waiting period is over, Remove the Disabled OLD Instance by issuing Docker STOP on the Container 8. Scale the NEW Instances and let them add to the HAProxy Pool 9. Repeat the steps 4 - 8 till all OLD instances are removed, and all the NEW instances are added to HAProxy 10. Delete the OLD Application ALGORITHM: Rolling Upgrades
  • 3. OLD OLD OLD OLD OLD OLD HAProxy CURRENT STATUS Old Instances are running and load balanced by HAProxy
  • 4. OLD OLD OLD OLD OLD OLD HAProxy L4 DNS Customer Service Port 1 CURRENT STATUS Old Instances are running and load balanced by HAProxy
  • 5. NEWOLD OLD OLD OLD OLD OLD HAProxy Minimum required to serve just enough traffic NEW INSTANCE DEPLOYED 1 Instance of the New Version of Application is deployed
  • 6. NEWOLD OLD OLD OLD OLD OLD HAProxy NEW INSTANCE DEPLOYED Health Check Passed
  • 7. NEWOLD OLD OLD OLD OLD OLD HAProxy NEW INSTANCE DEPLOYED Health Check Passed. Added to Load Balancer. One Old Instance is DISABLED from Load Balancer
  • 8. OLD OLD OLD OLD OLD OLD HAProxy L4 DNS Customer Service Port 1 NEW NEW INSTANCE DEPLOYED Added to Load Balancer. 16% new requests goes to NEW Instance. No New Request will go to Old Instance #1 disabled
  • 9. NEWOLD OLD OLD OLD OLD OLD HAProxy ZDD Control Marathon Mesos Control HOW IS ROLLING UPGRADE IMPLEMENTED ZDD requests HAProxy to DISABLE one of the OLD Instance ZDD is a Python Script part of the Marathon-lb Project from Mesosphere disabled
  • 10. NEWOLD OLD OLD OLD OLD OLD HAProxy ZDD Control Marathon Mesos Control HOW IS ROLLING UPGRADE IMPLEMENTED ZDD now waits for N seconds to drain any existing connections N seconds
  • 11. NEWOLD OLD OLD OLD OLD OLD HAProxyMesos STOP ZDD Control Marathon Control HOW IS ROLLING UPGRADE IMPLEMENTED After N seconds, ZDD requests Marathon to STOP one of the Old Instances
  • 12. NEWOLD OLD OLD OLD OLD OLD HAProxyMesos STOP M seconds ZDD Control Marathon Control HOW IS ROLLING UPGRADE IMPLEMENTED Mesos invokes Docker STOP on the Old Container, and waits for M seconds
  • 13. NEWOLD OLD OLD OLD OLD HAProxyMesos M seconds STOP N seconds OLD
  • 14. NEW NEWOLD OLD OLD OLD OLD HAProxyMesos M seconds STOP N seconds
  • 15. NEW NEWOLD OLD OLD OLD HAProxy M seconds Mesos STOP NEW N seconds
  • 16. NEW NEWOLD OLD OLD HAProxy M seconds Mesos STOP NEWNEW N seconds
  • 22. APP APP APP APP APP APP HAProxy ZDD Control Marathon Mesos Control DEV TEST STAGING PROD JENKINS PIPELINE ROLLING UPGRADES HAPPEN ACROSS ALL ENVIRONMENT ZDD orchestrates the deployment