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
2023-02-02T14:39:40.88+00:00

Methodology: 

  1. Spawned 2 APIMS: one in East Us and other in Southeast Asia.
  2. In each APIM, the same Azure storage is configured as the web service URL (https://<storage-account-name>.blob.core.windows.net/). 
  3. For the testing purposes, one GET operation is configured with necessary inbound policies such as:
    1. Get containers and file details from request headers
    2. Remove unnecessary header in API call
    3. Reconstruct URL pointing to the file in Azure storage
    4. Authenticate with Azure Storage via Managed Identities
  4. Then I enabled Managed Identities in Azure API Management, and configured Azure Storage to use Azure AD authentication.
  5. 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)

  1. Then observed the response latency through the ‘trace’ option.
  2. 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/)
  3. For all the test scenarios I checked the response latency and the avg response latencies were like in the below table.

User's image

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?

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,912 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,578 questions
Azure Content Delivery Network
{count} votes