Rolling deployments are a deployment strategy in AWS that gradually replaces instances of the previous version of an application with instances of the new version. This approach minimizes downtime and reduces risk by updating your infrastructure incrementally rather than all at once.<br><br>In AWS …Rolling deployments are a deployment strategy in AWS that gradually replaces instances of the previous version of an application with instances of the new version. This approach minimizes downtime and reduces risk by updating your infrastructure incrementally rather than all at once.<br><br>In AWS Elastic Beanstalk, rolling deployments work by dividing your environment's instances into batches. The deployment process updates one batch at a time while keeping the remaining instances running to handle traffic. Once a batch is successfully updated and passes health checks, the process moves to the next batch until all instances are running the new version.<br><br>Key configuration options for rolling deployments include batch size, which determines how many instances are updated simultaneously. You can specify this as a fixed number or percentage of total instances. A smaller batch size reduces capacity impact but increases deployment time.<br><br>Rolling deployments offer several advantages. They maintain application availability throughout the deployment process since healthy instances continue serving requests. If issues arise during deployment, only a portion of your fleet is affected, making rollback easier. This strategy also allows you to monitor the new version's performance gradually.<br><br>However, rolling deployments have considerations to keep in mind. During deployment, your environment runs mixed versions temporarily, which may cause compatibility issues. The deployment takes longer compared to all-at-once deployments. Additionally, your application must handle running with reduced capacity during updates.<br><br>AWS offers variations like Rolling with Additional Batch, which launches new instances before terminating old ones to maintain full capacity. This prevents any reduction in available instances during deployment.<br><br>For SysOps Administrators, understanding rolling deployments is essential for implementing zero-downtime deployments, managing production environments safely, and configuring appropriate batch sizes based on application requirements and acceptable risk levels.
Rolling Deployments - AWS SysOps Administrator Associate Guide
What are Rolling Deployments?
Rolling deployments are a deployment strategy where application updates are gradually released to a subset of instances at a time, rather than updating all instances simultaneously. This approach allows you to update your application with minimal downtime while maintaining service availability throughout the deployment process.
Why are Rolling Deployments Important?
Rolling deployments are crucial for several reasons:
• High Availability: Your application remains accessible during updates since only a portion of instances are being updated at any given time • Risk Mitigation: If issues arise during deployment, only a subset of users are affected, and you can halt the rollout • Controlled Updates: You maintain control over the pace of deployment and can monitor each batch before proceeding • Resource Efficiency: No need to provision additional infrastructure (unlike blue/green deployments) • Easy Rollback: Problems can be detected early, allowing for quicker rollback decisions
How Rolling Deployments Work in AWS
AWS Elastic Beanstalk Rolling Deployments:
1. You specify a batch size (percentage or fixed number of instances) 2. Elastic Beanstalk takes the first batch of instances out of service 3. The new application version is deployed to that batch 4. Health checks verify the instances are healthy 5. If successful, the process continues with the next batch 6. This repeats until all instances are updated
Key Configuration Options:
• Rolling: Deploy in batches, reducing capacity during deployment • Rolling with Additional Batch: Launches a new batch first to maintain full capacity • Batch Size: Number or percentage of instances to update at once
AWS CodeDeploy Rolling Deployments:
• Uses deployment configurations like OneAtATime, HalfAtATime, or custom configurations • Integrates with Auto Scaling groups for seamless updates • Supports automatic rollback on deployment failure
Rolling Deployment Trade-offs
• Longer Deployment Time: Takes more time than all-at-once deployments • Reduced Capacity: Standard rolling deployments temporarily reduce capacity (unless using additional batch) • Version Inconsistency: During deployment, different instances run different versions temporarily • Sticky Sessions Consideration: Users may experience inconsistent behavior if sessions are tied to specific instances
Exam Tips: Answering Questions on Rolling Deployments
• When the question mentions maintaining availability during deployment with minimal cost, rolling deployments are often the correct answer
• If the scenario requires FULL capacity during deployment, look for Rolling with Additional Batch as the answer
• Compare with other deployment strategies: - All-at-once = fastest but causes downtime - Rolling = balanced approach, some capacity reduction - Blue/Green = zero downtime but requires double resources - Immutable = new instances, slower but safer