What is the optimal Windows Azure size for my project?

   —   
Our customers are often asking me this question. Unfortunately, there is no simple answer and it depends on many different aspects.  This post aims to help you decide which size is optimal for your project. I will also show you how you can change an instance size.
First of all, let’s take a look at what Windows Azure offers. The following table shows available Windows Azure instance sizes:

Instance size CPU (GHz) Memory Instance storage Bandwith
XSmall 1 (shared) 768 MB 20 GB 5 Mbps
Small 1.6 1.7 GB 225 GB 100 Mbps
Medium 2x1.6 3.5 GB 490 GB 200 Mbps
Large 4x1.6 7 GB 1000 GB 400 Mbps
XLarge 8x1.6 14 GB 2040 GB 800 Mbps

Now, let´s look more closely on each column:

CPU – The XSmall instance is the only one where a CPU is shared. Microsoft doesn’t say exactly how many instances share a one core. The consequence of this fact is that you simply don’t know how this instance is going to perform.  Other instances have their CPU guaranteed and all cores use the same frequency. So, it’s a question of how many cores your instance should have (from 1 to 8).

Memory – memory is guaranteed for all instance sizes. But, the memory on the instance is not dedicated only to your web application. A part of it is taken by an operating system. On the other hand, the server doesn’t contain any unnecessary applications or an SQL server. Of course, the number of applications depends on whether we are talking about a web role, a worker role or a VM role, where you can install whatever you want to.

Instance storage – Kentico CMS uses the Windows Azure blob storage for storing files (instead of instance storage). A single Windows Azure blob storage account is limited to 100 TB. That being said, I guess this gives you enough space to store all your images and videos. Instance storage is used only as a temp and a cache for files. And even if you reach the limit on instance storage you can delete these files without any problems    

Bandwidth – A bandwidth shouldn’t be a bottleneck for most web applications. When you have really high traffic you will need more CPU and memory. Also, a significant amount of traffic could go from outside of your instance. You can serve files directly from the Windows Azure blob storage or from its built-in content delivery network (CDN).

Now, as you know what instances are there and what resources are available for you let’s focus on Kentico CMS. What is the optimal instance size for Kentico CMS? The short answer is – there is no optimal instance size. It always depends on the specific project.  If you want to know the long answer you will need to continue reading to the end.

First, we can eliminate the XSmall instance. This instance complies with minimal Kentico CMS system requirements. But the minimal requirements are really minimal and are far from providing the best experience. I simply would not recommend using it. However, you could use the XSmall instance for the SmartSearch worker role. This worker role could run on XSmall without any performance issues and you would not be overspending on the role.

So, we have four different sizes of instance which are all possible to use. How you can choose? Well, how do you choose server configuration on-premise? Windows Azure is not that different and you can use the same strategy. There are at least these three approaches.

1.    Select according to experience

There are already clients running Kentico CMS in Windows Azure. What size do they use? Most of them are running on small or medium. You can take a look at some Windows Azure Kentico sites on  the Kentico.com website. During development, Kentico CMS is usually tested on the small instance.
 
2.    Estimate according to project specifications

How complex will your application be? How many visitors do you expect? How many of them will register to see premium content? As you probably know, Kentico CMS now primarily uses memory for caching metadata (e.g. users) as well as content (e.g. output html). Caching could consume a lot of memory based on the configuration. If you want to cache everything to ensure you get the best performance for visitors, you would probably choose an instance with a larger amount of memory.

You should also consider what modules and features you plan to use. If you collect information using web analytics, use the E-commerce solution, or use the On-line Marketing solution, your requirements will be very different from those for a static website for corporate presentation.

Also, complex scheduled tasks executed multiple times per day could have impact on overall performance too.

3.    Experiment

You can always experiment with different sizes to see what gives the best performance for your budget. My advice here is start with the small instance during development and upgrade to the medium or large later in production when number of visitors significantly increases.     
 
The last thing I want to mention is how you can change instance size. The information about instance size is stored in the service definition file and it can be changed only when you redeploy the solution. You can find the service definition file in your Kentico CMS installed as a Windows Azure project in CMSAzureProject project, and the file is named servicedefinition.csdef. When you want to change the value for your Kentico CMS web application, open the file and locate the section WebRole with the attribute name CMSApp.

<WebRole name="CMSApp" vmsize="Small">

The second attribute, vmsize, defines instance size and you can change it to the following values: ExtraSmall, Small, Medium, Large, ExtraLarge. You can, of course, change the instance size for the SmartSearch worker role the same way. You just need to find the section WorkerRole with the attribute name SmartSearchWorker.

I hope this post sheds some light on how to choose the correct instance type for your project. As I said, Windows Azure is quite similar to standard servers so you can use the same method for choosing the most suitable size. And when you really don’t have any clue, experiment! Start with the small instance and update to the medium or higher until you find the optimal instance size for your project and your budget.
Share this article on   LinkedIn Google+

Dominik Pinter

I'm a fan of cloud computing (primarily Windows Azure) and I really like to dig into web application security. My blog is focused on everything related to Kentico, .NET Framework, Cloud platforms and web application security.

Comments