Hello @Rajat Srivastava !
Welcome to Microsoft QnA!
Regarding your Questions :
The Azure CDN infrastructure uses a distributed network of edge servers located around the world. When a user requests a file from your CDN endpoint, their DNS resolver resolves the CNAME record to the CDN endpoint's hostname, and then the request is routed to the nearest edge server based on the user's location. The traffic manager and front door are part of the underlying infrastructure that helps route the request efficiently to the nearest edge server.
The behavior you described might be due to caching. When a file is requested from the CDN endpoint, the edge server first checks if it has a cached copy of the file. If it does, it serves the cached copy directly, resulting in lower latency. The cached copy remains on the edge server until the cache expiration time is reached or the file is evicted from the cache due to space constraints. Even if you delete the file from the storage account, the edge server may continue to serve the cached copy until it expires or is invalidated.
To ensure that your traffic stays on the Microsoft global network and takes advantage of the closest edge servers, you can consider the following:
**Configure the caching behavior**: You can control caching behavior by setting appropriate cache-control headers for your files. This allows you to specify the cache expiration time and caching rules, ensuring that files are cached for the desired duration.
Use Azure CDN Premium: Azure CDN Premium offers advanced features such as rules engine, real-time stats, and advanced caching options. It provides more control over how your content is cached and delivered, allowing you to optimize performance and control the behavior of the CDN.
**Choose the right CDN endpoint location**: When creating a CDN profile, you can choose the optimal CDN endpoint location that is closest to your target audience. This helps reduce latency and ensures that traffic is served from nearby edge servers.
I hope this helps!
Kindly mark the answer as Accepted and Upvote in case it helped!
Regards