API Gateway has high latency compared to the previous day
Why do I see this?
One of your API endpoints is experiencing an increase in the average latency compared to the previous day.
What does this mean?
An API Gateway's latency is the interval of time between receiving a request and responding to it. Ideally, the lower the latency, the better the user experience. Therefore it is crucial to monitor API Gateways to detect any significant increase in latencies in order to determine the cause and reduce delays. This event notifies you if the latency of one of your API endpoints in the past 24 hours is found to be more than twice what it was in the preceding 24 hours.
How do I fix "API Gateway has high latency compared to the previous day"?
Changes in latency may appear due to many reasons. Following are some of the things you can do to determine the cause of the latency:
- Review and compare IntegrationLatency and Latency metrics for the API
- When IntegrationLatency metric is low compared to the Latency metric, the delays might be caused by an API Gateway Lambda authorizer or processes such as mapping templates configured in the API.
- When the Latency metric is lower, review the route between the client and the API Gateway to check if any intermediate endpoints are causing delays.
- Review the content of the requests sent to the API
- Check and review if any new versions of the API code have been deployed
After you determine the cause of high latency, you can work on reducing the delays.