• en | es

Scaling Umbraco On Windows Azure Part III

This is the last part of the series about how to scale an Umbraco website on the Windows Azure platform.

You’re being successful, cater for more visits

One of the benefits of platforms as a service like Windows Azure, is that you don’t have to know in advance how many sites your company will have, or how popular and resource consuming your application will be. The platform provides you a way to adapt your hosting to whatever the needs are at a given time. In the Windows Azure platform you can scale your sites on the fly.

Scaling Up

Scaling up will allow your application to get more resources on the same instance.

Scaling Out

Scaling out on Windows Azure consists of spinning additional instances of the application. Load balancing between the instances is provided by the platform and thus does not require further configuration. The application must therefore be multi-instance safe. This requires extra care to ensure that items such as how the data is consumed by the application, the handling of user sessions and access to resources are thread safe. Sticky-sessions are not managed out of the box by the Azure platform, one way to ensure continuity of sessions on multi-instances is to store sessions in the Azure session state provider or in the Azure Redis Cache; another way would be to leverage the routing capabilities in Windows Azure to route requests to stateful instances.

Go to the application settings on your Windows Azure Web Service (WAWS) platform and look for the App service plan menu. There you will find the Scale out menu.

Unfortunately scaling functionality is not part of the Free Service Plan.

So we need to select the S1 Standard plan to be able to access scaling options and configure the scaling of our application. We can see that for the moment we have only one instance running. We can manually add another instance of our application. Or we can scale given the CPU usage in percentage of our application.

I modified the home page template to add some dummy code and get the page to fetch blog posts multiple times, triggering many requests to the server.

Looking back into the Azure portal, we can see that the scaling took place.

And I even received an email letting me know that my application is scaling.

After about twenty minutes without activity on the website, and having removed the code that caused extra load on the CPUs, our application has been automatically scaled back down to one instance.

In this part of the series, we have showed how to automatically scale an Umbraco installation, without having to worry about anything other than the cost. However scaling an application requires you to manage the its state at a global level. For Umbraco for example, the main pain points are handling the session state, the Lucene index files and the config file. Depending on the version of Umbraco you run, some of those concerns have been addressed. Notice that we did not need any Visual Studio IDE, nor did we need to install IIS, we have a scalable website within a few clicks. This is the peace of mind that well-built software should give you. Always remember that a hundred-instance production software system might have different needs than a ten-instance one. Maybe you need more powerful tools to monitor and inspect the state of your platform.

About the author

During her career, Halima worked as a consultant in various projects ranging from large integrated enterprise software to small single purpose websites. She has been attracted to the technical side of software after working on data migration projects and decided to retrain and learn how to code.

Joining Codurance, Halima has levelled up her engineering skills and embraced the values of software craftsmanship. As a skilled professional she aims at delivering value by building robust and resilient software. City Lead organiser at Women Who Code London, Halima is actively working on bringing diversity to the tech community.