azurecdnazure-storageazure-blob-storagemicrosoft-cdn

Best performance for storing static files (images, css, javascript) - CDN - BlobStorage or WebRole


I have a very basic question about CDN - BlobStorage and WebRole, and perfrormance.

I have a very simple web site with static content, HTML, Js, Images, CSS & videos (totally could me max 3-5MB the whole content if the users visit all the site). The traffic of my web site will be 98% from UK and I am planning to have a maximum of 500.000 unique visitors per day.

My question is about performance.

Would you recommend me enabling CDN on my webrole? Would I benefit from it? is there a benefit using CDN even if my traffic is coming "mainly" from UK? is CDN content cached on Internet providers (eg. BT) proxy?

Would you recommend me hosting images, video etc on a blob storage account and reference it with absolute url from the web role? is there any difference in term of performance between hosting a static file on a blob (may be enabling CDN on the storage account?) or just put the static file on the web role?

I have not found many references online, but I guess that the web role, the CDN and the Storage, use different disks / cache layers / network layers and it should affect on performances.


Solution

  • The only thing I can think of is that using a CDN role, you might have better headers on images (Cache-Control, Expires), so that the browser and proxies can cache for a long time those images, while if you serve those images from your main site you're in charge of controlling the headers on those resources.

    Serving images from a different domain will also help, because all the request to resources hosted on the CDN (different domain name, do not use 3rd level domains) will not contain the cookies and authentication headers you need for the main site.