Adding Scale to ASP.NET Applications in the Cloud
In a recent Microsoft webinar, Brian Prince, Senior Architect Evangelist, and Nathan Totten, Technical Evangelist, presented several options for scaling ASP.NET applications hosted on Windows Azure.
The presenters noted that these options can be used in any combination to scale applications either up or down. They fall under a few broad categories: caching, traffic distribution, asynchronous work processing, and storage. Prince and Totten recommend using some combination of the following for scaling up an ASP.NET application:
Increase the number of Azure instances
Like adding virtual servers, this is the simplest way to distribute load.
Add Table or Blob Storage
Table Storage is schema-less and non-relational, but more scalable than SQL Azure. According to Totten, Table Storage can handle about 500 requests per second per partition. Blob Storage is a non-structured option, and can be useful for larger files.
Add AppFabric Caching
AppFabric is used for in-memory caching of frequently-accessed data, and can also serve as a session state provider.
Use an asynchronous work process
The Azure Queue sends messages to background processes known as 'worker roles'. This would be an appropriate setup for handling shopping carts or file uploads; the business logic is processed in the background to improve performance on the front-end. Queues are limited in size, but can be combined with Table and Blob Storage.
Offload static or semi-static content to the Azure Content Delivery Network
According to the presenters, Windows Azure Content Delivery Network (CDN) currently has 26 nodes worldwide, and more are being added regularly. Distributing static data (or data that’s refreshed less often) to the CDN could improve performance for the user, since it will be delivered from the nearest datacenter.
Take advantage of Traffic Manager
The Windows Azure Traffic Manager is similar to the CDN, but rather than storing content, it hosts the entire application in multiple locations for better availability worldwide. The Traffic Manager can also be used in a failover system in case the primary instance isn’t available.
Prince and Totten note that solid initial application design will always be the key to good performance, but that Windows Azure's aim is to make it possible to scale applications up and down easily as an organization’s needs dictate.
York Xyander, Bodo Junglas Jul 31, 2015