SOA-C02 Exam QuestionsBrowse all questions from this exam

SOA-C02 Exam - Question 83


A company analyzes sales data for its customers. Customers upload files to one of the company's Amazon S3 buckets, and a message is posted to an Amazon

Simple Queue Service (Amazon SQS) queue that contains the object Amazon Resource Name (ARN). An application that runs on an Amazon EC2 instance polls the queue and processes the messages. The processing time depends on the size of the file.

Customers are reporting delays in the processing of their files. A SysOps administrator decides to configure Amazon EC2 Auto Scaling as the first step. The

SysOps administrator creates an Amazon Machine Image (AMI) that is based on the existing EC2 instance. The SysOps administrator also creates a launch template that references the AMI.

How should the SysOps administrator configure the Auto Scaling policy to improve the response time?

Show Answer
Correct Answer: D

To improve response times, the SysOps administrator should create a custom metric that considers both the ApproximateNumberOfMessagesVisible metric and the number of instances in the InService state in the Auto Scaling group. This combination reflects the queue depth and the current processing capacity, allowing the system to dynamically scale instances based on actual workload demands. This approach ensures better responsiveness to variable processing times.

Discussion

17 comments
Sign in to comment
weixing
Nov 11, 2022

It is D

Liongeek
Nov 17, 2022

Ans: B

foreverlearnerOption: D
Dec 21, 2022

The issue here is that the app is taking too long to process the files. This means that the messages are in the SQS queue, just they're not being processed fast enough. It can't be B as "ApproximateNumberOfMessagesDelayed – Returns the approximate number of messages in the queue that are delayed and not available for reading immediately" (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_GetQueueAttributes.html). This would mean that the messages are not available, which isn't the case in this question The link posted by zolthar_z clearly explains why it's D. The app takes a variable amount of time to process each message, hence the app should calculate the Backlog per instance

jiparkOption: D
Aug 12, 2023

I thought B, but it looks D. numberofDelay seems just delay setting msg, not queued msg : B. ApproximateNumberOfMessagesDelayed – Returns the approximate number of messages in the queue that are delayed and not available for reading immediately. This can happen when the queue is configured as a delay queue or when a message has been sent with a delay parameter. D. ApproximateNumberOfMessagesNotVisible – Returns the approximate number of messages that are in flight. Messages are considered to be in flight if they have been sent to a client but have not yet been deleted or have not yet reached the end of their visibility window.

zolthar_zOption: D
Dec 19, 2022

The answer is D: https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-using-sqs-queue.html

squeeze_talus0yOption: D
Jan 14, 2023

AWS offers even an example for this - https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-target-tracking-metric-math.html#metric-math-sqs-queue-backlog

Spike2020
Feb 5, 2023

C. D: There is no "ApproximateNumberOfMessagesVisible" parameter. It should be ApproximateNumberOfMessagesNotVisible

defmania00
Feb 25, 2023

There sure is an "ApproximateNumberOfMessagesVisible" parameter.

jas26says
Jul 7, 2023

there isn´t https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_GetQueueAttributes.html

tttfakil
Aug 6, 2023

Why Not? https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-available-cloudwatch-metrics.html

VivecOption: D
Mar 9, 2023

When there are delays in processing files due to a high volume of messages in the queue, adding more instances using Auto Scaling can help to reduce the processing time. The ApproximateNumberOfMessagesVisible metric is a good indicator of the workload on the EC2 instances. By creating an Auto Scaling policy based on this metric, the number of instances can be scaled up or down depending on the number of messages in the queue.

gokalpkocer3
Sep 1, 2023

Modifying an application is almost always a no-no in AWS exams. so I will go with B.

marcelodbaOption: D
Nov 27, 2022

It's D

marcelodba
Dec 9, 2022

Ans is B

Mila28Option: D
Dec 23, 2022

I'm agree with D

hexieOption: B
Jun 11, 2023

if ApproximateNumberOfMessagesDelayed is increasing, wouldnt it be a good way to make the ASG scaling? Also providing the scalability accordingly to the problem its facing? And "modifying the application to calculate.." doesnt also sound for something to the devs, not for the SysOps Administrator? I'm going for B.

callspaceOption: D
Oct 3, 2023

Looks like the answer is in this link: (D) ApproximateNumberOfMessagesDelayed: The number of messages in the queue that are delayed and not available for reading immediately. This can happen when the queue is configured as a delay queue or when a message has been sent with a delay parameter. Which means not that they are delayed because of the insufficient available capacity to process but "delayed" is more of a feature rather than a result of something. ApproximateNumberOfMessagesVisible: The number of messages to be processed.

Maria2023Option: D
Feb 7, 2024

ApproximateNumberOfMessagesDelayed - The number of messages in the queue that are delayed and not available for reading immediately. This can happen when the queue is configured as a delay queue or when a message has been sent with a delay parameter. In our scenario the messages are not delayed in the queue - just not been picked up yet. Hence I vote for "D"

JoeBoom
Feb 16, 2024

ApproximateNumberOfMessagesDelayed is a built in metric not a custom metric Answer is B

auxwwwOption: D
Jul 1, 2024

ApproximateNumberOfMessagesDelayed - The number of messages in the queue that are delayed and not available for reading immediately. This can happen when the queue is configured as a delay queue or when a message has been sent with a delay parameter. In our scenario the messages are not delayed in the queue - just not been picked up yet.

be9z
Jul 3, 2024

The answer is D: This approach involves custom monitoring of queue depth and instance count, allowing dynamic scaling based on workload demands. By combining both metrics, you can achieve responsiveness while considering varying processing times.