Why slow response latency in Azure APIM when it is located in a nearby region and the CDN is enabled at backend Blob storage?
MORA_190290U_Pasan Sanjula
20
Reputation points
Methodology:
- Spawned 2 APIMS: one in East Us and other in Southeast Asia.
- In each APIM, the same Azure storage is configured as the web service URL (https://<storage-account-name>.blob.core.windows.net/).
- For the testing purposes, one GET operation is configured with necessary inbound policies such as:
- Get containers and file details from request headers
- Remove unnecessary header in API call
- Reconstruct URL pointing to the file in Azure storage
- Authenticate with Azure Storage via Managed Identities
- Then I enabled Managed Identities in Azure API Management, and configured Azure Storage to use Azure AD authentication.
- Then made the test api calls through Azure APIM with the container and blobs headers
Ref: https://medium.com/marcus-tee-anytime/secure-azure-blob-storage-with-azure-api-management-managed-identities-b0b82b53533c (The above configuration in detail)
- Then observed the response latency through the ‘trace’ option.
- I repeated the steps 2 - 5, with Azure CDN enabled blob storage.(By changing the web service URL to cdn url which has the form of https://<CDN-endpoint-name>.azureedge.net/)
- For all the test scenarios I checked the response latency and the avg response latencies were like in the below table.
The Southeast Asia region is the closest region to me (from Sri Lanka). Then how come high average response latencies were recorded for 3rd and 4th cases?
Sign in to answer