Question

Difficulty: MediumDeployment Strategies

A developer is managing an application deployed on a fleet of 10 Amazon EC2 instances using AWS CodeDeploy. The application must maintain a minimum of 8 healthy instances at all times during a deployment to handle peak traffic loads. To minimize the overall deployment duration as much as possible while strictly adhering to this capacity constraint, which CodeDeploy deployment configuration should the developer choose?

  1. A custom deployment configuration with the minimum healthy hosts set to 80%.Answer
  2. B
    The default CodeDeployDefault.OneAtATime deployment configuration.
  3. C
    The default CodeDeployDefault.HalfAtATime deployment configuration.
  4. D
    The default CodeDeployDefault.AllAtOnce deployment configuration.

Answer

A custom deployment configuration with the minimum healthy hosts set to 80%.
A custom deployment configuration specifying a minimum of 80% healthy hosts allows CodeDeploy to update 2 instances in parallel. This is the fastest way to deploy the update because it maximizes the number of parallel updates (2 instances) while guaranteeing that the remaining 8 instances (80%) stay online and healthy, satisfying the customer constraint.

Step-by-Step Solution

1
Identify the minimum capacity requirement from the scenario constraints.
The application runs on 10 EC2 instances and requires at least 8 instances to remain healthy, which equates to 8/10=80%8/10 = 80\% minimum healthy capacity.
This determines the lower bound of healthy resources required during the update process.
2
Calculate the maximum number of instances that can be updated concurrently.
Subtracting the required healthy instances from the total fleet size (108=210 - 8 = 2), we find that a maximum of 2 instances can be offline/updating at any given time.
To minimize deployment duration, we must maximize parallel updates without dropping below the capacity floor.
3
Evaluate the default CodeDeploy deployment configurations against the constraints.
CodeDeployDefault.OneAtATime updates 1 instance at a time (slower). CodeDeployDefault.HalfAtATime updates 5 instances at a time (violates the healthy host constraint). CodeDeployDefault.AllAtOnce updates 10 instances at a time (causes complete downtime).
To verify if any built-in default configurations can optimize the deployment time while maintaining safety.
4
Select the optimal configuration that meets all criteria.
A custom deployment configuration with minimum healthy hosts set to 80% (or 8 hosts) is selected as it allows 2 parallel updates, making it faster than the OneAtATime configuration.
Custom configurations are necessary when default configurations either violate safety constraints or perform suboptimally.

Key Concept

AWS CodeDeploy deployment configurations and capacity management
Estimated Time:1m 30s
Rate this question