SOA-C02 Question 5
Select 2A company is running a web application on Amazon EC2 instances behind an Application Load Balancer (ALB). The SysOps Administrator is tasked with setting up monitoring and alerting to detect high response times on the application. Which combination of steps should the administrator take to meet this requirement?
- A
Create a custom Amazon CloudWatch metric for response times and set up a CloudWatch alarm.
- B
Enable ALB access logs and analyze them using Amazon Athena.
- C
Use the 'TargetResponseTime' metric from the ALB in Amazon CloudWatch and create an alarm to notify when response times exceed a threshold.
- D
Configure AWS CloudTrail to monitor all API calls related to the ALB for performance metrics.
- E
Set up an Amazon CloudWatch Logs metric filter to extract response time data from ALB logs, and create an alarm based on the metric.
Show answer and explanation
Correct answers: C, E
Explanation
The most efficient way to monitor high response times is to use the built-in 'TargetResponseTime' metric from the ALB and set up a CloudWatch alarm for it. If finer-grained custom metrics are needed, a CloudWatch Logs metric filter can be used to extract response time data from ALB logs. Both methods provide automated and actionable monitoring capabilities, which align with the goal of detecting and alerting on high response times.
- A. Incorrect.
Creating a custom CloudWatch metric for response times is unnecessary because ALB already provides built-in metrics like 'TargetResponseTime'.
- B. Incorrect.
Enabling ALB access logs and analyzing them with Athena can provide insights into application response times, but it is not directly tied to real-time monitoring or automated alerting.
- C. Correct.
Using the 'TargetResponseTime' metric from ALB in CloudWatch is the correct approach, as this built-in metric specifically tracks the response times of targets behind the load balancer. Setting an alarm on this metric allows for automated notifications.
- D. Incorrect.
AWS CloudTrail is used for auditing API calls and does not provide performance metrics for ALB or the application, making it irrelevant for this use case.
- E. Correct.
Setting up a CloudWatch Logs metric filter for response time data in ALB logs is a valid approach to extract and analyze custom metrics, enabling alarms to be created for specific thresholds.