How does Azure CDN find closest location to a client?

Andrei Mironov 21 Reputation points
2021-03-03T11:43:22.61+00:00

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 Content Delivery Network
0 comments No comments
{count} votes

Accepted answer
  1. GitaraniSharma-MSFT 47,086 Reputation points Microsoft Employee
    2021-03-05T10:54:32.06+00:00

    Hello @Andrei Mironov ,

    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://learn.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://learn.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://learn.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.

    0 comments No comments

0 additional answers

Sort by: Most helpful