Autoscalling on Azure : Scale Up … & Down!


Today we’ll be building further on the steps we took in the previous post ; “Autoscaling Docker hosts on Azure with Virtual Machine Scale Sets & Rancher“.


What will we be doing?

  • Deploy our VMSS with a scale-up & a scale-down configuration
  • Stress our VMSS so it will scale-up
  • Remove the stress so our VMSS will scale-down

Let’s get ready to rumble!

Let’s start by deploying our VMSS… I’ve taken the setup from the previous time and extended the auto scale rules ;

2016-03-07 10_39_17-azure-rancher-vmss - Microsoft Visual Studio

And after deployment, we see our first node popping up…

2016-03-07 09_32_39-Rancher

So now let’s stress that node! I’ll add a basic linux node with a small command that will stress the system to the max without doing anything useful. 🙂

2016-03-07 09_36_55-Rancher

The container is now running and we can verify that the process in the container is consuming way too much CPU.

2016-03-07 09_39_07-Rancher

And our host system verifies that stress …

2016-03-07 09_40_51-Rancher 2016-03-07 09_44_40-Rancher

After a while, we can see our VMSS scaling up!

2016-03-07 09_57_36-Events - Microsoft Azure

You can even see those steps in the “Audit Logs”.

2016-03-07 09_58_37-Events - Microsoft Azure

And there is our second node!

2016-03-07 10_02_59-Rancher

And now we’ll be reducing the stress… by stopping that bad container.

2016-03-07 10_03_12-Rancher

Immediately we notice the drop in CPU on our host system.

2016-03-07 10_03_39-Rancher

And after a bit our capacity will start decreasing. As an important sidenote, be sure to setup your auto scale parameters correctly. During this PoC, I noticed that the scale-up took some time, and the mechanism was up to 5 nodes quite quickly…

2016-03-07 10_23_26-Events - Microsoft Azure

Anyhow, in Rancher we can see that we had 5 nodes and that the scale-down brought it to 4…

2016-03-07 10_23_36-Rancher

To two…

2016-03-07 10_34_40-Rancher

As also shown in Azure.

2016-03-07 10_34_50-Events - Microsoft Azure

And back to our minimum!

2016-03-07 10_44_31-Rancher



So what did we learn today?

  • You can auto scale up and down.
  • The tweaking of your autoscale parameters is a very important facet.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.