Why slow response latency in Azure APIM when it is located in a nearby region and the CDN is enabled at backend Blob storage?
- 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?
MORA_190290U_Pasan Sanjula Thank you for posting your question in Microsoft Q&A and explaining in detail. Based on my understanding, I assume you are experiencing high latency when connecting to Azure Blob Storage (with or without CDN) from Southeast Asia region (compared to East US). Can you please explain about the client you are using to make a request to APIM with details such as portal test console or some other app, region?
Also, want to check if you have tested directly from the client to Azure Blob Storage without APIM and faced similar latency issues. That would help in isolating the issue. If so, I would suggest opening a support ticket with our Azure Support team and they have the best tools, resources to review the backend logs and investigate the cause.
If you don't have support plan, please let us know and we can assist you in creating one-time free technical support request. Looking forward to your response.
Sign in to comment