DOP-C02 Question 73
Select 3You are managing the deployment of a critical web application on Amazon EC2 instances in an Auto Scaling group. The application has a history of issues during updates due to configuration drift and dependency mismatches. To address this, you are considering transitioning from a mutable deployment pattern to an immutable deployment pattern. Which of the following statements are advantages of adopting an immutable deployment pattern in this scenario?
- A
Eliminates configuration drift by deploying new instances with a fresh configuration.
- B
Enables in-place updates to EC2 instances within the Auto Scaling group, reducing deployment time.
- C
Allows for easy rollback by switching traffic to the previous version of instances.
- D
Requires fewer resources since only the application code is updated in existing instances.
- E
Improves consistency across environments by deploying pre-configured AMIs.
Show answer and explanation
Correct answers: A, C, E
Explanation
Immutable deployment patterns offer key advantages such as eliminating configuration drift, enabling predictable rollbacks, and ensuring consistency across environments by deploying pre-configured AMIs. These benefits make immutable deployments particularly suited for environments prone to issues caused by configuration changes or dependency mismatches, as they replace instances rather than modifying them in-place.
- A. Correct.
Immutable deployments eliminate configuration drift because new instances are launched with a clean and pre-configured state, ensuring no residual issues from previous deployments.
- B. Incorrect.
This is incorrect because immutable deployments do not use in-place updates. Instead, they replace the existing instances entirely, which might increase deployment time but ensures consistency.
- C. Correct.
Immutable deployments facilitate easy rollbacks by allowing traffic to be directed back to the previously deployed instances if issues arise.
- D. Incorrect.
This is incorrect because immutable deployments require creating and launching entirely new instances, which often demand more resources compared to updating existing instances.
- E. Correct.
Deploying pre-configured AMIs ensures consistency across environments and eliminates the risk of differences in configuration or dependencies.