Zero-Downtime Deployment on AWS

Implementing automated blue/green, canary, and rolling deployments on AWS using ALB, Jenkins CI/CD, and CloudFront.


Overview

Executive Summary

A global collaboration platform required zero-downtime deployment on AWS. By using an ALB, VPC, S3 with CloudFront, and a Jenkins CI/CD pipeline supporting rolling, blue/green, and canary releases, we enabled automated, reliable deployments with instant rollbacks and optimized network performance.

Why AWS

AWS was selected for its high availability, low-latency networking, and strong scalability. Its CI/CD ecosystem and fast rollback features enabled zero-downtime releases while maintaining reliability and resilience.

The Challenge

A B2B messaging platform serving enterprise teams needed zero-downtime, high-speed deployments, but its AWS setup was manual, making rollbacks slow and increasing operational risk. An automated deployment process was essential to maintain availability and performance.

Architectural Decisions

Zero-Downtime Strategy

  • Blue/Green deployment   for major version releases:
  • • Jenkins automatically manages rollback by tracking the previous environment and switching target groups in ALB within less than 12 sec if health checks fail.
  • Blue/Green switch with rollback
    stage('Blue/Green Switch') {
        steps {
            script {
                sh """
                  aws elbv2 modify-listener \
                    --listener-arn ${LISTENER_ARN} \
                    --default-actions Type=forward,TargetGroupArn=${NEW_TG_ARN}
                """
    
                sleep 30
    
                def unhealthy = sh(
                    script: """
                        aws elbv2 describe-target-health \
                          --target-group-arn ${NEW_TG_ARN} \
                          --query 'TargetHealthDescriptions[?TargetHealth.State!=\`healthy\`]' \
                          --output text
                    """,
                    returnStdout: true
                ).trim()
    
                if (unhealthy) {
                    echo "Health check failed — rolling back"
                    sh """
                        aws elbv2 modify-listener \
                          --listener-arn ${LISTENER_ARN} \
                          --default-actions Type=forward,TargetGroupArn=${OLD_TG_ARN}
                    """
                    error("Deployment rolled back")
                }
            }
        }
    }

  • Canary deployment   for patch versions:
  • • Traffic is gradually shifted using weighted target groups in ALB.
    • Jenkins dynamically adjusts canary percentages based on real-time metrics (latency, error rate) to ensure safe rollout.

  • Rolling deployments   for config-only changes:
  • • Instances are updated in batches to maintain service availability.
    • ALB health checks ensure only healthy instances receive traffic.
    • Jenkins orchestrates batch size and pauses rollout automatically if error thresholds are exceeded.
    • Previous instance group is preserved temporarily to allow fast rollback if needed.

Performance & Stability Measurements

Load Test

  • checkmark   450 concurrent clients
  • checkmark   25,000 messages over 20 minutes
  • checkmark   File uploads: 8.5GB mixed content
MetricValue
Avg API latency124 ms
WebSocket drops0.4%
Deployment downtime0 sec
RDS CPU48–55%
Canary failure rate~3%

Results & Benefits

The deployment framework delivered zero-downtime releases with blue/green and canary strategies, instant rollback under 12 seconds, and fast asset delivery via S3 + CloudFront. Internal users now experience sub-150 ms response times, while a fully isolated VPC and auditable CI/CD history ensure security and reliability. Over the past 30 days, uptime reached 99.996%, demonstrating the effectiveness of the automated, repeatable infrastructure.

Logo

Take off with Jet1  today

Jet1 handles all your deployments, infrastructure, and monitoring.
Are you ready to start your journey?