SAP-C02 · Question #763
A company runs a web application on a single Amazon EC2 instance. End users experience slow application performance during times of peak usage, when CPU utilization is consistently more than 95%. A us
The correct answer is D. Use a dynamic scaling policy. Enable warm pools for the Auto Scaling group. Use lifecycle hooks. To decrease application latency during auto scaling, the solution should use a dynamic scaling policy to react to high CPU, enable warm pools to pre-provision and pre-initialize instances, and utilize lifecycle hooks to ensure user data scripts run before instances serve traffic.
Question
A company runs a web application on a single Amazon EC2 instance. End users experience slow application performance during times of peak usage, when CPU utilization is consistently more than 95%. A user data script installs required custom packages on the EC2 instance. The process of launching the instance takes several minutes. The company is creating an Auto Scaling group that has mixed instance groups, varied CPUs, and a maximum capacity limit. The Auto Scaling group will use a launch template for various configuration options. The company needs to decrease application latency when new instances are launched during auto scaling. Which solution will meet these requirements?
Options
- AUse a predictive scaling policy. Use an instance maintenance policy to run the user data script.
- BUse a dynamic scaling policy. Use lifecycle hooks to run the user data script. Set the default
- CUse a predictive scaling policy. Enable warm pools for the Auto Scaling group. Use an instance
- DUse a dynamic scaling policy. Enable warm pools for the Auto Scaling group. Use lifecycle hooks
How the community answered
(37 responses)- A24% (9)
- B5% (2)
- C14% (5)
- D57% (21)
Why each option
To decrease application latency during auto scaling, the solution should use a dynamic scaling policy to react to high CPU, enable warm pools to pre-provision and pre-initialize instances, and utilize lifecycle hooks to ensure user data scripts run before instances serve traffic.
While predictive scaling can help with proactive capacity, an instance maintenance policy is for managing instance health and updates, not for running user data scripts or pre-warming instances.
Lifecycle hooks can run user data, but without warm pools, new instances would still need to be launched from scratch and fully initialized, which would not decrease the latency during launches.
An instance maintenance policy is designed for managing updates and health of instances, not for running initial user data scripts or accelerating instance launch readiness within a warm pool setup.
A dynamic scaling policy (e.g., target tracking or step scaling) effectively addresses performance degradation by reacting to real-time metrics like high CPU utilization. Enabling warm pools significantly reduces launch latency by pre-provisioning and pre-initializing instances, including running user data scripts via lifecycle hooks, making them ready to serve traffic almost immediately when needed.
Concept tested: EC2 Auto Scaling, Warm Pools, Lifecycle Hooks, Dynamic Scaling
Source: https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-warm-pools.html
Community Discussion
No community discussion yet for this question.