영업: 1-800-867-1380

 none
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 perfrormances...

    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 performances....

    Would you reccomend me to enable 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 reccomend me to host 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 much references on line, 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...

    looking forward to hear your opinion....

    Thanks Stelio

     


    http://ecommerceondotnet.blogspot.com/

    2012년 3월 1일 목요일 오전 11:46

답변

  • Hi Stelio,

    I don't know the exact context of your application, but you can consider 2 options.

    Option 1 

    Put all static content on your blob storage. This will make sure your web role instances are not 'overloaded' by requests for static content. The blob storage is very scalable and it will take care of that for you. This will be good enough in most cases.

    Option 2 

    Where does your hosted service run? In West or North Europe? If your users are mainly from the UK it might be interesting to look at the CDN to increase performance. The CDN has a node located in London, which is very close to your users and this will increase performance for them. You could choose to use the blob storage together with the CDN.

    http://blogs.msdn.com/b/windowsazure/archive/2010/08/09/20-nodes-available-globally-for-the-windows-azure-cdn.aspx

    Sandrino

    2012년 3월 5일 월요일 오후 2:56

모든 응답

  • Hi Stelio,

    According to your description, Windows Azure CDN (Content Delivery Network) can help to improve your application performance by caching content at locations closest to your customers and users, CDN is good for some static content (.css, .js, image files), streaming media files (vedio, audio files), or something need take a long time (such as query data with multiple conditions from a huge nerwork database) and they will be accessed frequently. So, customers or users can get their data faster and improve application's user-experience.

    Also, Enable CDN in Windows Azure is very easy try to following Azure Trainning course and have a try:

    http://msdn.microsoft.com/en-us/gg405418

    http://msdn.microsoft.com/en-us/wazplatformtrainingcourse_windowsazurecdn_topic3#_Toc310605911

    http://msdn.microsoft.com/en-us/wazplatformtrainingcourse_windowsazurecdn_topic4#_Toc310605914

    Hope it can help you.


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework

    2012년 3월 2일 금요일 오전 7:42
  • Hi Stelio,

    Like Arwind said, for true performance you'll need to go for the CDN. Many tutorials explain how you can use the CDN by putting a cdn folder in your hosted service. I wouldn't do that, I prefer putting my static content in the blob storage to minimize the load on my web role instances.

    Now, it's also important to know how performance will increase when you use the CDN for static content:

    1. Images, downloads, ... will be served by the blob storage / CDN. This means your web role instances will have more resources available to serve your users.
    2. Internet Explorer limits your connections to 2 per domain. This means, if your website has 5 javascript files and 10 images, it will process them 2 by 2 until they've all been downloaded. With the CDN, the user will be downloading the files from multiple domains, and this will allow your browser to do this work in parallel. And finally, this increases the performance for the end user.

    Sandrino

    2012년 3월 5일 월요일 오후 1:44
  • Hi Sandrino,

    probably my question was not very clear....

    is it convenient to use CDN if all my traffic is coming from the same country and it will be served from the same data center???? or it is just a waste of money in my context???

    Shall I expect the same "GLOBAL" network performance from a storage account and web role CDN???? How bad could be to use the local storage on the web role in my scenario??? I would expect better performance from the storage account, but I am trying to understand if it is worthed in my scenario....

    I can agree about the client/browser consideration, this is not very relevant at this stage for me...

    Thanks for the clarification.

    Stelio


    http://ecommerceondotnet.blogspot.com/

    2012년 3월 5일 월요일 오후 2:45
  • Hi Stelio,

    I don't know the exact context of your application, but you can consider 2 options.

    Option 1 

    Put all static content on your blob storage. This will make sure your web role instances are not 'overloaded' by requests for static content. The blob storage is very scalable and it will take care of that for you. This will be good enough in most cases.

    Option 2 

    Where does your hosted service run? In West or North Europe? If your users are mainly from the UK it might be interesting to look at the CDN to increase performance. The CDN has a node located in London, which is very close to your users and this will increase performance for them. You could choose to use the blob storage together with the CDN.

    http://blogs.msdn.com/b/windowsazure/archive/2010/08/09/20-nodes-available-globally-for-the-windows-azure-cdn.aspx

    Sandrino

    2012년 3월 5일 월요일 오후 2:56