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.
Conclusion
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.
5 tips for surviving a cloud outage (Brandon Butler) - More focus in Amazon web services this post in fact is saying don't put all your eggs in the same basket.
“For a rich comparison of SQL Azure and Windows Azure Table storage, see Joseph Fultz’s MSDN Magazine article at: http://aka.ms/SQLAzureVsAzureTables.”
Joining the dots in the cloud - Nice post about the new collection of cloud tools that will help you to connect services or applications together and the things you should be aware of.
Windows Azure Learning Path–Level 300 (Brian H. Prince) - Third of a series, this post regroup advanced exercises reference (level 300) about the Azure connectivity options.
“There does not seem to be any good working OAUTH v2 examples for Java using ACS”
Windows Azure App Scaling to Need (Grigori Melnik, Julian Dominguez) - Very nice video about Wasabi the Windows auto-scaling Application block. A must.
Ruby tricks: Array syntax (chatgris) - Quick post quick tricks... now I looking forward the next time I will try it.
Ajax Control Toolkit May 2012 Release - Great! The timing is perfect. One day after this new release some project arrived and they need exactly this new version of the upload control... thanks!
“You Complete Me” Says SharePoint to Windows Azure (Jonathan Rozenblit) - Really nice post that just open the possibilities on how could be implanted Azure with other application and in this case with SharePoint.
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.
Windows Azure Diagnostics–From the Ground Up (Greg Oliver) - Really nice post with a lot of good references and a lot of information. Perfect to get started or have a better understanding of Azure diagnostics.
Fun with the Service Bus (Part 1) - What a great tutorial! This post is covering a lot a material by doing for a to z an application where the heart is Azure Service Bus.
Code First model builder versions (Arthur Vickers) - This post explain how to configure EF code first to avoid any breaking code when updating the framework to a newer version. Nice work.
Hit the Presentation Sweet Spot - Twenty minutes is very short. Maybe it is a good idea for a specific type of presentation... How do you plan a 2-3 formation?
Your Personal Brand as a Developer: Implementing (Part 2 of 2) (Jonathan Rozenblit) - Part 2 on an unusual topic but important. Our brand, as a person. On the internet everything is amplified and could be seen by a lot of people very quickly. A post to read "before it is too late".
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.
Best practices for migration to the cloud - Nice post that contain all the link you need in one place to read all the best practice and useful information on migration to the cloud.
A Social, Mobile, and Cloudy Modern Web Application (David Pallmann) - First of a series, this nice post present a well done application that combines HTML5, mobility, social networking and cloud computing.
Microsoft Reinvents its Cloud Strategy (Martin Tantow) - Nice post comparing the new cloud positioning strategy o Microsoft with the majors players when looking for CRM
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.
ASP.NET MVC, Web API, Razor and Open Source (Scott Gu) - The post by The Scott Gu announcing the release of Asp.Net MVC as open source project and some features of the version 4.0.
Introduction to Ruby code optimization - Nice post that present few tools to help when you need optimization. Those tools are good specially if you don't know where is the bottle neck.
I wish I knew about string.Join a long time ago (Carlos Figueira) - Nice refactoring. As Carlos is saying looking into the code you write on year ago is good. Some mistake wear done, but at least we learn.
Miscellaneous
10 Good Reasons to Get a Mentor - Interesting thoughts. I'm sure a lot of people would gain a lot by having a mentor. Starting with me!