Troubleshooting Disproportionate Scaling in AWS Multi-Tier Architecture

Dealing with Disproportionate Scaling in AWS Multi-Tier Architecture

Prev Question Next Question

Question

You have a large multi-tier architecture creating using cloudformation, that serves public facing web traffic through a load balancer and is backed by a web tier that is contained within an Amazon EC2 Auto Scaling group.

During a peak in traffic, you discover that your web tier is adding new instances disproportionately compared to the amount of incoming traffic and the Auto Scaling policy that was set up.

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

The problem described in the question is that during a peak in traffic, the web tier is adding new instances disproportionately compared to the amount of incoming traffic and the Auto Scaling policy that was set up. This could be caused by the Auto Scaling group not having enough time to recognize the incoming traffic, or the health check taking too long to confirm that a new instance is healthy and can handle traffic.

To resolve this problem, we need to adjust the Auto Scaling group's settings to account for the delay in recognizing traffic and the time it takes for new instances to become healthy. There are several options to consider:

Option A: Using CloudWatch and the instance BootTime metric, increase the PauseTime and CoolDown property on the Auto Scaling group to be over the value of the metric.

Explanation: The instance BootTime metric measures the time it takes for a new instance to launch and start running. By increasing the PauseTime and CoolDown property on the Auto Scaling group to be over the value of the metric, we can give the group enough time to recognize the incoming traffic and prevent it from adding new instances too quickly. This option is simple to implement, as it only requires using CloudWatch and adjusting two settings on the Auto Scaling group.

Option B: Using a custom CloudWatch metric insert the elapsed time since the instance launch to the time the instance responds to an Elastic Load Balancing health check, and periodically adjust the Pause Time and the CoolDown property on the AutoScaling group to be over the value of the metric.

Explanation: This option involves creating a custom CloudWatch metric that measures the time it takes for a new instance to respond to an Elastic Load Balancing health check. By periodically adjusting the Pause Time and CoolDown property on the Auto Scaling group to be over the value of the metric, we can ensure that the group waits long enough to confirm that a new instance is healthy before adding more instances. This option is more complex than Option A, as it requires creating a custom metric and periodically adjusting two settings on the Auto Scaling group.

Option C: Using a custom CloudWatch metric insert the elapsed time since the instance launch to the time the instance responds to an Elastic Load Balancing health check, and periodically adjust the Pause Time of the UpdatePolicy and reduce the Scaling Adjustment property by 50%.

Explanation: This option involves creating a custom CloudWatch metric that measures the time it takes for a new instance to respond to an Elastic Load Balancing health check. Instead of adjusting the Pause Time and CoolDown property, we adjust the Pause Time of the UpdatePolicy and reduce the Scaling Adjustment property by 50%. This ensures that the group waits long enough to confirm that a new instance is healthy before adding more instances and reduces the number of instances added in response to traffic spikes. This option is more complex than Option A, as it requires creating a custom metric and adjusting two settings on the Auto Scaling group.

Option D: Using a third-party configuration management tool and the AWS SDK suspend all ScheduledActions of the Auto Scaling group until after the traffic peak and then resume all scheduledActions.

Explanation: This option involves using a third-party configuration management tool and the AWS SDK to suspend all ScheduledActions of the Auto Scaling group until after the traffic peak and then resume all scheduledActions. This prevents the Auto Scaling group from adding new instances in response to traffic spikes and ensures that the group only adds instances when necessary. This option is the most complex of all the options, as it requires using a third-party tool and the AWS SDK to manage the Auto Scaling group's settings.

In conclusion, Option A is the simplest and most straightforward option to resolve the problem described in the question. Option B and Option C are more complex but offer more fine-grained control over the Auto Scaling group's behavior. Option D is the most complex and involves using