0 votes
in AWS by

You've currently set up an API gateway service in AWS. The API gateway is calling a custom API hosted on an EC2 Instance.

There are severe latency issues, and you need to diagnose the reason for those latency issues. Which of the following could be used to address this concern?

1 Answer

0 votes
by

Answer - A.

The AWS Documentation mentions the following.

AWS X-Ray is an AWS service that allows you to trace latency issues with your Amazon API Gateway APIs.

X-Ray collects metadata from the API Gateway service and any downstream services that make up your API.

X-Ray uses this metadata to generate a detailed service graph that illustrates latency spikes and other issues that impact your API's performance.

Option B is invalid since this is used for logging API execution operations.

Option C is invalid since this is used for logging API Gateway API management operations.

Option D is invalid since this is used for logging calls into the VPC.For more information on the API monitoring overview, please refer to the below URL-

https://docs.aws.amazon.com/apigateway/latest/developerguide/monitoring_overview.html

The correct answer is A. AWS X-Ray.

AWS X-Ray is a service that helps developers analyze and debug distributed applications, including those built using microservices architecture. It provides end-to-end tracing of requests as they flow through your application, so you can identify performance bottlenecks and troubleshoot issues quickly.

In this scenario, the API gateway is calling a custom API hosted on an EC2 Instance, and there are severe latency issues. By using AWS X-Ray, you can trace the request flow and identify which component(s) of your application are causing the latency issues.

AWS CloudWatch is a monitoring and observability service that provides metrics, logs, and alarms for AWS resources and applications. While it can help you monitor the overall health of your API Gateway and EC2 instances, it does not provide detailed tracing of requests.

AWS CloudTrail is a service that logs all API calls made to AWS resources in your account. While it can help you track changes and troubleshoot issues related to IAM policies or resource access, it does not provide detailed tracing of requests.

AWS VPC Flow Logs capture information about the IP traffic going to and from network interfaces in a VPC. While it can help you monitor network traffic and troubleshoot issues related to network connectivity, it does not provide detailed tracing of requests through your application.

Therefore, AWS X-Ray is the most appropriate service for diagnosing the severe latency issues in this scenario.

...