ScottGu's Blog - Great! This new service is awesome. Learn more in this post or follow the references to go dipper.
[…]Read this getting started tutorial to walkthrough how you can build (in less than 5 minutes) a simple Windows 8 “Todo List” app that is cloud enabled using Windows Azure Mobile Services. Or watch this video of me showing how to do it step by step. […]
Amazon AWS is the Cloud (for now anyway) - It is true that Amazon web services is a strong well establish cloud provider. And big players like Google and Microsoft will force them to always improve the quality of their services.
One of the questions that clients often ask is: What tools could be used for Windows Azure development. Everyone knows that you need a web browser and a code editor (ex: Visual Studio), but what else? So, I decided to do a serie of posts to present them. This second post is about the Auto-scaling Application Block or WASABi for friends.
This serie is not meant to be an exhaustive list of all tools. Some other excellent tools are surely available. If you think I have forgotten one or want me to talk about one, let me know. I will be more than happy to adding it to the list.
To achieve elasticity until now, you needed to do it manually through the Azure management portal or writing your own code using the REST API. Using Wasabi, you just need to define some rules and the application will scale automatically: It can use a schedule or can be triggered by metrics, for example running fewer instances at night or adding extra instances if the CPUs are used at more than 80%.
The auto-scaling application block can be hosted either in a Windows Azure role or in an on-premises application. The auto-scaling application is typically hosted in a separate application from the target application that you want to scale.
Various scenarios are available to help you manage the auto-scaling by dynamically changing instance counts or performing application throttling of web/worker roles. The rules can auto scale based on timetables or metrics collected from the application and/or Windows Azure. You can even use notifications to preview any scaling operations before they take place and you can also use some PowerShell cmdlets to manage the autoscaler. You can constrain the auto scaling by:
Setting the instance counts upper and lower bounds
Preventing fast oscillations in the number of role instances with the stabilizer
For this demo we will use a simple Hello word application and scale it with a rule via a console application based on time.
Step 1: Put the app in Azure
To get started an Azure application is needed. Don’t forget to assign a certificate since the console application will need it.
You can then publish the application on the cloud.
Step 2: Adding the scaling application
Now create a console application and name it AutoScalingConsole. Add the WASABi package by executing: Install-Package EnterpriseLibrary.WindowsAzure.Autoscaling.
It should run without error and your Solution should look like this.
Step 3: Add and configure the rules
Add a new file call Rules.xml and set the property Copy to Output Directory: Copy always. Copy-paste this xml into the rules file.
It contains two rules: A default one that is always active, defining minimum and maximum instance counts of 1, and a second one used for scaling. The variable “Is rank” with a value of one means that it can be overridden by other constraint rules with a higher rank. . Naturally, if that rule is applied, there will be only a single instance of the role.
The second rule is named peaktime. This rule has the same target, a higher rank, a minimum value of two, a maximum value of four. Also a timetable makes the rule active for 20 minutes, starting at 10 minutes from the current time.
Step 4: Define the service model
You will now add a new xml file called services.xml and set the property Copy to Output Directory: Copy always. Copy-paste this xml into the services file.
Replace [yoursubscriptionname] with the name of your Windows Azure subscription and [yoursubscriptionid] with your Windows Azure subscription ID.
Replace [yourmanagementcertificatethumbprint] with your Windows Azure management certificate thumbprint.
Replace [yourhostedservicednsprefix] with the URL prefix of your Windows Azure hosted service.
Replace [yourstorageaccountname] with your Windows Azure storage account name and [yourstorageaccountkey] with your Windows Azure storage account primary access key.
Step 5: Configure the Auto-scaling Application Block
Right-click on the App.config file in Solution Explorer, add one if needed, then click Edit Configuration File. In the Blocks menu, click Add Autoscaling Settings. Now set the rules.xml and services.xml as sources for Rules Store and Service Information Store. Via the File menu, Save then Exit.
To by able to track evolution of the the testing let’s add some logging. In Visual Studio, double-click on the App.config file to open it in the editor. Then add this system.diagnostics at the end of the file:
You can now run the console application and observe how the auto-scaling rules work with the Azure application. Check the Output window in Visual Studio that logs which rules are being matched.
Using Wasabi makes your application elastic but doesn’t make your application scalable you must therefore design for scalability. If you have any comments, suggestions or experiences to share, feel free to let me know by adding a comment, by e-mail or by the contact page.
Why Infrastructure As A Service Is A Bad Deal - It could be difficult to have a idea of the saving you could do going in the cloud. This post only looks the storage scenario. You could be surprise of the result, but I bet that the arrival of Google Drive and is aggressive pricing will makes thing moved.
Coping with Email Overload (Peter) - This could be a good advice for a lot of people. While I'm working on a project where co-workers are across the country I not sure I can do this but maybe tweaking it with rules for only those people.
Protecting Windows Azure Web and Worker roles from malware (maartenba) - Not long time ago Microsoft release the Microsoft Endpoint Protection for Windows Azure Customer Technology Preview (EP for friends) and in this great post you will know how to install it, configure it and how to use it.
A Comprehensive Introduction to Cloud Computing - I did already mention is great introduction post in some Reading Notes, but at this time the author was rebuilding is blog and the article was removed. So if you didn't have the time to read it the first time, here is your chance.