AWS Certified Developer - Associate Exam | Autoscaling Based on Concurrent Users | DVA-C01

Autoscaling Based on Concurrent Users

Prev Question Next Question

Question

An application includes an Autoscaling Group.

It has been determined that the best way to scale the group is based on the number of concurrent users.

How can you achieve this?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer - B.

The AWS Documentation mentions the following.

With target tracking scaling policies, you select a predefined metric or configure a customized metric and set a target value.

Application Auto Scaling creates and manages the CloudWatch alarms that trigger the scaling policy and calculates the scaling adjustment based on the metric and the target value.

The scaling policy adds or removes capacity as required to keep the metric at, or close to, the specified target value.

In addition to keeping the metric close to the target value, a target tracking scaling policy also adjusts to changes in the metric due to a changing load pattern.

It minimizes changes to the capacity of the scalable target.

Since you can define a custom metric based on concurrent usage, you can scale the Autoscaling group based on that.

Based on this, all other options are invalid.

For more information on auto-scaling based on target tracking, please refer to the below URL-

https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-target-tracking.html

The best way to scale an Autoscaling Group is to base the scaling on the metric that is most closely related to the performance of your application. In this case, since it has been determined that the best way to scale the group is based on the number of concurrent users, the Autoscaling Group needs to be scaled based on this metric.

However, concurrent user metrics are not natively available in AWS CloudWatch, so you cannot use it directly to scale your Autoscaling Group. Therefore, you will need to create a custom metric for the number of concurrent users using Amazon CloudWatch.

Option A, creating a tag for the group to contain the number of concurrent users, is not the best way to scale the group since it does not provide a mechanism to measure the actual number of concurrent users.

Option B, creating a custom metric for the number of concurrent users, is the correct answer. This will require adding the necessary instrumentation to the application code to measure the number of concurrent users and push that metric to CloudWatch. Once the metric is available in CloudWatch, it can be used as a scaling metric for the Autoscaling Group.

Options C and D, basing the scaling of the group on CPU or Memory percentage, respectively, are not appropriate since these metrics are not closely related to the performance of the application in terms of concurrent users. Basing the scaling on these metrics may lead to over-provisioning or under-provisioning of resources, depending on the workload characteristics of the application.