Welcome!

Think first. Code later.

Adam Grocholski

Subscribe to Adam Grocholski: eMailAlertsEmail Alerts
Get Adam Grocholski via: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Related Topics: SSL Journal, Ubuntu Linux Journal, SEO Journal, Azure Cloud on Ulitzer

Blog Feed Post

Azure CLI Day 15 – site scale mode

bash-azure

In my three previous posts I showed you how to stop (http://thinkfirstcodelater.com/blog/?p=3115), start (http://thinkfirstcodelater.com/blog/?p=3124), and restart( http://thinkfirstcodelater.com/blog/?p=3131) and Windows Azure web site using the cross platform command line tools. In the next three posts we’ll look at how to scale a Windows Azure web site. In this post we’ll look at changing the scaling mode.


Once again, just a reminder that I’m using the command line tools on a MacBook Air with OSX (Mountain Lion) installed, and I’m using Google Chrome as my default browser. However, the experience should be identical on Windows and Linux as well.

Open an instance of your command line (Terminal, Bash, Command Prompt, etc.) and type the following:

azure site scale mode -h

Screen Shot 2013-09-14 at 3.36.13 PM

In order to change the scaling mode of a Windows Azure web site you need to provide a value for the –mode option along with the name of the web site. The three options available are free, shared, and standard. Here’s a quick definition of what each one means:

  • Free.When a web site is first created it runs in Free web site mode, meaning that it shares available compute resources with other subscribers that are also running web sites in Free or Shared web site mode.
  • Shared.A web site that is configured as or updated to Shared mode uses a low-cost scaling mode that provides high availability and more performance than Free mode.
  • Standard.A web site that is configured as Standard will provide high availability and more consistent performance than a web site that is configured as Free or Shared. Standard mode also has support for SNI and IP-based SSL certificates for custom domains.

You can read a more detailed description of each scaling mode at http://www.windowsazure.com/en-us/manage/services/web-sites/how-to-scale-websites/ .

When you create a web site, it runs in the Free mode. In this post we’ll look at how to go from Free to Shared to Standard and back to Free. To change to Shared mode, enter the following in your CLI, substituting where appropriate:

azure site scale mode –mode Shared “[YOUR WEB SITE NAME]“

In my case I entered the following:

azure site scale mode –mode Shared “antares101″

Screen Shot 2013-09-14 at 3.44.49 PM

You can verify the mode has changed by going into the SCALE portion of your web site’s dashboard in the Windows Azure management portal.

Screen Shot 2013-09-14 at 3.47.20 PM

To go from Shared to Standard mode, enter the following into your CLI, substituting where appropriate:

azure site scale mode –mode Standard “[YOUR WEB SITE NAME]“

In my case I entered the following:

azure site scale mode –mode Standard “antares101″

Screen Shot 2013-09-14 at 3.49.14 PM

While you could once again verify the change in the portal, you can also use the azure site show ‘[YOUR WEB SITE NAME' command to do the same. However, determine the mode of the site isn't intuitive when looking at the output of the azure site show command. There are two values you need to inspect to determine the site's mode: Site ComputerMode and Site SiteMode.

  • Free. In Free mode Site ComputerMode will be set to Shared and Site SiteMode will be set to Limited.
  • Shared. In Shared mode Site ComputerMode will be set to Shared and Site SiteMode will be set to Basic.
  • Standard. In Mode mode Site ComputerMode will be set to Dedicated and Site SiteMode will be set to Basic.

Screen Shot 2013-09-14 at 4.02.46 PM

To change the mode of your site back to free, enter the following into your CLI using your specific value:

azure site scale mode --mode Free "[YOUR WEB SITE NAME]“

In my case I entered:

azure site scale mode –mode Free “antares101″

Screen Shot 2013-09-14 at 4.05.01 PM

The change can be verified by going back into the SCALE portion of your web site’s dashboard in the management portal.

Screen Shot 2013-09-14 at 4.05.32 PM

That’s it. In the next post we’ll look at how to increase and decrease the number of instances the web site is running on.

Did you know you can try Windows Azure for free for 30 days? Just go to http://aka.ms/thecloud and sign up.

Read the original blog entry...

More Stories By Adam Grocholski

Hey there! My name is Adam Grocholski, and I'm a Technical Evangelist at Microsoft where I spend time focusing on Windows, Windows Phone, and Windows Azure. I live in the frozen tundra of Minnesota and run thinkfirstcodelater.com. You can also follow me on twitter at @codel8r.