2
votes

I have an ASP.Net MVC website running on a shared IIS7 host that allows users to create their own landing page. The website allows users to edit the content, style (edit css via a UI) as well as uploading images.

I am considering migrating to Windows Azure to improve scalability and improve database backups (using SQL Azure Data Sync see http://social.technet.microsoft.com/wiki/contents/articles/sql-azure-backup-and-restore-strategy.aspx, I am limited in the SQL backup plans offered with my host)

One stumbling block is, since the clients can upload images and edit css files, these files will need to be stored in the blob storage or the database (any other options?). I don't want to use the database because database storage as it is more expensive.

However, if these files are stored in blob storage, how will this impact the performance of the website given the files (css, images) are fetched from the blob storage instead of being read from the same disk as the website? I know browser caching will reduce the requests for these files, but what about first time requests?

4

4 Answers

3
votes

Using blob storage for css and images will actually increase the performance of your website. As astaykov stated, blobs have their own URL, separate from your deployment URL. This means you're driving less traffic through your Web Role's IIS server, thus reducing overall load on that server instance.

Further, a browser typically is configured for two concurrent connections to a given domain. By having images and css located on a separate domain, your browser will now have more concurrent connections.

Regarding the editing of images or css files, it's true that the web app code will need to push new content to a blob, which might add a bit of latency. However, this latency may or may not be noticeable (depending on the load you're putting on your web app). I would think that should be an infrequent operation, compared to serving up content.

1
votes

these files will need to be stored in the blob storage or the database (any other options?).

NO. There are no other options.

However, if these files are stored in blob storage, how will this impact the performance of the website given the files (css, images) are fetched from the blob storage instead of being read from the same disk as the website?

The only performance "Degradation" would be when the user save the edits. And not when the files are fetched. But you have to be a little more agile then with the regular approach. Instead of having the URLs for the CSS and images pointing to the file system (i.e. /styles/site.css), you have to point them directly to the blob (i.e. http://account.blob.core.windows.net/styles/site.css).

Or even better - as olivehour suggested - you can enable the CDN for the blob storage account and format the CSS/Image urls to point to the CDN version. Thus the only performance impact of having the CSS and images in the blob would be better and better performance.

Note, you can have your own domain associated with the blob storage and with the CDN, so there will not be any fancy URLs like "blob.core.windows.net".

0
votes

In addition to blob storage, there is also Windows Azure Content Delivery Network (CDN). Since you have a browser-based application, this might be faster than blob storage.

0
votes

You can now use Windows Azure Websites, and you won't have to worry about migrating to SQL Azure databases if you don't want to - it essentially works essentially the same as whatever you're currently hosting through IIS7. You can manage it all via webmatrix, your MVC site can still write to the "filesystem" (for your client uploaded css files)

You can find more about Windows Azure Websites here.