AWS Certified DevOps Engineer – Professional (DOP-C02) — Question 373
A company has deployed a microservices-based application on Amazon Elastic Container Service (Amazon ECS). The application is experiencing performance issues. The company needs to identify which microservices are causing the issues.
Which solution will provide this information?
Answer options
- A. Configure AWS X-Ray for each ECS task. Create an X-Ray group for each microservice. Implement custom X-Ray subsegments in each microservice to capture detailed timing information. Use an X-Ray service map to visualize and identify slow microservices and requests.
- B. Configure AWS X-Ray for each ECS task. Use an X-Ray service map to visualize the application's architecture and request flow. Filter the X-Ray traces by response time and error rate. Identify the microservices that have high latency or high error rates. Analyze individual traces to identify slow microservices and requests.
- C. Configure Amazon CloudWatch Container Insights for each ECS task. Analyze Container Insights metrics to identify slow microservices. Use CloudWatch Logs Insights to filter the Container Insights log data by response time and error rate. Analyze the log data to identify slow requests.
- D. Configure Amazon CloudWatch Container Insights for each ECS task. Use the CloudWatch automatic dashboard for Amazon ECS to identify slow microservices. Use CloudWatch Logs Insights to analyze the Container Insights performance logs for each ECS task to identify slow requests.
Correct answer: B
Explanation
AWS X-Ray is designed specifically for tracing and analyzing distributed microservices applications, offering a service map and trace filters to easily isolate latency and error bottlenecks. While Amazon CloudWatch Container Insights (Options C and D) provides infrastructure-level metrics and performance logs, it does not trace end-to-end request paths across microservices as effectively as X-Ray. Option B is the most efficient and standard way to locate the issues without the unnecessary overhead of creating custom subsegments and groups for every microservice as suggested in Option A.