CDN does not choose closest PoP for blob storage - azure

I have a storage account in South Cental US Data center with images. I have a CDN (Verizon standard) endpoint for this storage account.I am using SAS key for accessing my storage account. While accessing contents from CDN, it actually takes more time than getting the data directly from storage account. I investigated and found that the CDN content is being downloaded from US Verizon POP location instead of my closet pop location. I am accessing from India and verizon has a pop location on my city.
Any suggestion what would be the issue?

Optimization choices are designed to use best-practice behaviors to improve content delivery performance and better origin offload. Your scenario choices affect performance by modifying configurations for partial caching, object chunking, and the origin failure retry policy.
This article provides an overview of various optimization features and when you should use them. For more information on features and limitations, see the respective articles on each individual optimization type: https://learn.microsoft.com/en-us/azure/cdn/cdn-optimization-overview
Try switching the optimization scenarios, it may resolve the latency issue you are experiencing. let me know if this helped.

Related

How to share an image publicly in Azure without opening myself to b/w abuse/costs

I've (think I've) thought through every way I can think of sharing an image in Azure and they all leave me open to someone abusing the download and costing me in bandwidth costs.
The goal is an AMI-like experience, except that seems right out, so settle for a solution that forces the user to copy the image to their subscription first, then create a Shared Image Gallery from that. But again, without exposing a raw download to the Internet, or allowing cross-region intra-Azure pulls that would also cost money.
public blob in Azure StorageV2 account- exposes you to bw attack
public blob in Azure StorageV2 account with Firewall - Microsoft Trusted Services that are default allowed doesn't seem to include the image service, though I didn't test this myself. If it did this might work, as the Image service blocks cross-location replication from blob storage by default IIRC.
Shared Image Gallery - cross tenant sharing is clunky, not at all feasible for AMI-like scenarios
???
I do not want to go through the process of being a Marketplace certified image, which as far as I can tell, is the only publicly available route for making a truly public image and not incurring costs.
Why not just put it in a storage account and user Shared Access Signatures?
Then its still possible to download over internet if you have the SAS, its easy to withdraw the SAS and you can limit it both in time and by IP if needed.

Azure CDN - With Local Web Server

Hello I'm looking at a method for speeding up a website and providing a 5MB download (Windows App + Later this year Android version) to international customers. The numbers etc are not known at this stage but would like to know what options are available. The web server is based in NZ currently and is a WordPress install.
I'm new to these subject areas, so not 100% sure on the best move. So have a few Questions?
Would a Proxy such as Varnish be enough for a few 100 downloads a day (Possibly Hopeful)? - if hosted in NZ - its likely to be slow for international customers - without testing would be hard to know - have had a Google and haven't found anything to answer this thoroughly yet.
Could I use Azure CDN and point that at my current web server - if so where would I find good documentation on this? Or could someone provide some measure of cost here, the CDN pricing refers to the locations - I assume that would refer to each edge server - so perhaps would need to purchase a few locations to get a thorough coverage?
I assume once its setup it isn't too much hassle to add in more locations if needed + I think if we had an Australian location (Perhaps first location) - it should in theory be quite a bit faster than from NZ (Not that Azure offers)
Will keep looking in the meantime...
Thanks
Azure CDN would be a good solution. However, you don't "point" Azure CDN at your server. You upload and manage content in Azure BLOB Storage and enable CDN capabilities that basically duplicates your content to all Azure data centers and uses the CDN capability to pull from the location closest to the client. The CDN provides a CDN based URL or custom URL to link your content in a website.

Azure CDN vs Azure Blob storage origin pull takes way too long

I am using azure blob storage to store images in a public container and embedding them in a public website. Everything works fine, blobs are publicly available on xxxxx.blob.core.windows.net the instant i upload them. I wanted to use Azure CDN for their edge caching infrastructure and set up one at xxxxx.vo.msecnd.net.
But now, when i point my images to the CDN, it returns 404 for a good 15 mins or so, then it starts serving. It's mentioned on their documentation that we should not use CDN for high violatile or frequently changing blobs, but a simple CMS with image upload feature for a public site warrants a CDN isn't it?
I am in exactly the same situation at the moment for product images that are uploaded to my e-commerce site. I prefer to use Azure CDN on top of Azure blob storage for all of the obvious reasons but cannot wait 15 minutes for the image to be available.
For now I have resolved to store the blob storage URL initially but then later rewrite it to use the CDN domain via an Azure WebJob running once daily. It seems like an unnecessary amount of extra work but I haven't yet found a better option and really want to use the Azure CDN.
What I'm doing right now... for website related images and files I upload manually before deployment (https://abc.blob.core.windows.net/cdn) and If website User upload an image or file using my website, Internally I upload that file on blob storage (separate container not CDN) using CloudBlobClient
CDN is used for static content delivery, but in your case you need dynamic content delivery via CDN. You could use Cloud Service + CDN. This makes Dynamic contents delivered from CDN using ASP.net Caching concepts.
Please refer this link for more details: Using the Windows Azure Content Delivery Network (CDN)
CDN enables a user to fetch content from a CDN-POP that is geographically closest to the user thus allowing lower read latencies.
Without a CDN, every request would reach the origin server (in your case Azure Storage). The low latency offered by CDN is achieved when there are cache hits. On a cache miss, a CDN-POP will fetch the content from the origin server reducing the latency benefit offered by CDN. Cache hits are usually dependent on whether the content is static (results in cache hits) or dynamic (results in cache miss) and its popularity (hot objects result in cache hit).
Your choice of using a CDN or not depends on a) whether your files are static or dynamic, if dynamic then the benefit of using a CDN is lower b) whether low latency is important to your application and c) Request rate : With low number of requests your files are likely to be cached-out so a CDN may not be that useful and d) Whether you have high scalability requirements. Note, Azure storage has the following scalability limits. If your application exceeds the scalability limits of azure storage then it is recommended to use a CDN

Azure blob storage and its CDN performance?

In case one's website only targets a single geographical region, is there still benefit to serve the resource from Azure CDN instead of directly from Blob storage?
Would the CDN be better in handling high traffic condition (more parallel access to the resource)?
If you plan to grow the website or users have VPNs that could potentially alter network patterns, a CDN might be a good option. A CDN has to copy the files from blob storage and caches based on internal conventions or settings. Essentially you are adding additional instructions in front of a CDN.
Also note the Azure CDN API is pretty simple and not as robust as Akamai or other CDNs..you can compare the APIs. For example, if you want to serve the file from an in memory cache, it is probably better to have a service abstracted from it. This allows you to control how the bytes are sent down to the client explicitly..there is a huge difference in accessing small files, medium files or large files...which might provide much better performance depending on your needs.
In my opinion, I would not bother with a CDN.
A CDN (regardless of provider) won't help you that much if the edge servers are not near where your web consumers are. Will it provide better scale out of requests? Maybe. The only certainty is that it will cost you more :).
I'd recommend start off without a CDN, make your resource references easily updateable so you can switch to a CDN if need be (regardless of who provides the CDN service).

Azure CDN file download statistics

How do I see file download statistics with Azure CDN and/or get statistics using a .NET program? I want to put a file in Azure CDN and see how many times the file was downloaded, more details like country of downloaders etc would be nice too.
I don't think there is currently such statistics available. All you can see is the number CDN transactions and CDN bandwidth consumed. You can see this in the monthly bill (in billing history).
Try to use "manage cdn" button on the portal and it leads you to another portal where you can see analytics. Programmatical access is not supported yet.

Resources