question

AndreiMironov-6390 avatar image
0 Votes"
AndreiMironov-6390 asked ·

How does Azure CDN find closest location to a client?

The ping command always shows the same IP address from any location. I created VMs in different regions (US, Europe, Asia, Australia), and from every VM the IP address is the same - 13.107.246.19. Does that mean that in my case Azure CDN does not serve the content from the closest location to the client, but instead from one single location?

ping xxxxxxxxxxx.azureedge.net

Pinging standard.t-0009.t-msedge.net [13.107.246.19] with 32 bytes of data:
Reply from 13.107.246.19: bytes=32 time=49ms TTL=118
Reply from 13.107.246.19: bytes=32 time=29ms TTL=118
Reply from 13.107.246.19: bytes=32 time=12ms TTL=118
Reply from 13.107.246.19: bytes=32 time=12ms TTL=118

Ping statistics for 13.107.246.19:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 12ms, Maximum = 49ms, Average = 25ms


azure-cdn
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

GitaraniSharmaMSFT-4262 avatar image
0 Votes"
GitaraniSharmaMSFT-4262 answered ·

Hello @AndreiMironov-6390 ,

Azure Standard Microsoft CDN uses Anycast IPs, so the POP location IP addresses are the same globally. If you perform a Dig/ping on any Azure CDN endpoint, you can see the same 2 Anycast IP addresses:

standard.t-0009.t-msedge.net. 181 IN A 13.107.246.19
standard.t-0009.t-msedge.net. 181 IN A 13.107.213.19

How does Azure CDN find closest location to a client? : https://docs.microsoft.com/en-us/azure/cdn/cdn-overview#how-it-works

If you want to find out on which Geo POP edge the request landed, you can make use of the AzureCdnAccessLog.
The logs can be viewed under your Log Analytics profile by running a query. A sample query would look like: AzureDiagnostics | where Category == "AzureCdnAccessLog".

The logs will provide various details, out of which you can find the below info as well:
ClientIp : The IP address of the client that made the request. If there was an X-Forwarded-For header in the request, then the Client IP is picked from the same.
POP : Short name of the edge where the request landed.

Once you find the short name of the POP edge, you can check the same in the below article to find the exact location:
https://docs.microsoft.com/en-us/azure/cdn/cdn-pop-abbreviations

For more information on Azure CDN logs and how to set them up, please refer : https://docs.microsoft.com/en-us/azure/cdn/monitoring-and-access-log

Kindly let us know if the above helps or you need further assistance on this issue.


Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.