Azure VM Scale Sets

enhanced stability 

Keeping VM Scale Sets performing optimally

In April 2016, Microsoft released Azure VM Scale Sets (VMSS).  Referred by many, as the successor to Azure Cloud Services, VMSS service provides management of multiple ubiquitous load-balanced Virtual Machines as a single logical unit.  This is especially useful for compute workloads, such as worker pools or web farms comprised of multiple servers doing the same type of work.  VMSS is the underlying service behind Azure Service Fabric and Azure Batch.  Effectively, it is becoming the core way for organizations to deploy scalable compute resources into Azure.

For organizations utilizing Azure VM Scale Sets regular reboots can help mitigate common causes of performance degradation, such as memory leaks, connections that weren’t properly closed and disposed of, etc. Similar to ensuring stability for Azure Cloud Roles CloudMonix helps with automation of common tasks that keep VM Scale Sets performing optimally.

In this case study, we’ll discuss a few very simple approaches to keep your Azure VM Scale Sets stable proactively and reactively as well as saving costs with the proper management of the time an application is up and running.

Proactive stability – DAILY SCHEDULED REBOOTS

Rebooting VM Scale Sets on a regular basis ensures that applications are stable and perform optimally. The longer a server is running without reboots, the more issues and performance degradations influence it. Memory and disk fragmentation, poorly closed connections, obsolete data in a cache, large temporary folders, and of course memory leaks can cause very poor application performance.

CloudMonix allows performing proactive daily reboots at a simple checkbox click. Read below >

Reactive stability – REBOOTS ON DEMAND

Reboots on demand are the reactive measure to deal with critical issues that an application may encounter throughout the day. Severe memory leaks, queued up or “stuck” IIS requests, hung processes, etc. can all lead to major instability of the application at random times during the day.

CloudMonix allows for immediate and automatic recovery from such events via reboots on-demand. Read below >

How to do daily reboots

To simplify configuration CloudMonix comes with a set of monitoring templates that define popular metrics, alerts, and automation. Default template for VM Scale Sets already contains the “Daily Reboot” action that will reboot every VM in the set once per day.

In order to enable the “Daily Reboot” action complete the following steps:

  • select your resource, go to Settings and select Actions tab;
  • select the “Daily Reboot” action from the list of available default actions;
  • check the “Enabled” checkbox to activate the action.

Rebooting of instances is done one-at-a-time, at the top of every hour, starting at UTC 0.00. Rebooting instances one at a time ensures that VM Scale Set continues to be up and running.

CloudMonix - proactive reboots

How to configure reboots on demand

Cloudmonix allows to set up actions to reboot instances when free memory is low or IIS requests start piling up. By default, CloudMonix tracks available memory with the help of “MemoryFree” metric and queued up requests with “AspNetRequestsQueued”.

Setting up an action that reboots an instance when available memory drops below some threshold for a sustained amount of time is trivial and takes a few seconds. This action is built-in into the default CloudMonix profiles as “Low Ram Reboot” and is disabled by default. In order to activate this action select the “Low Ram Reboot” action under “Actions” tab in instance settings and check the “Enabled” checkbox. Configure additional parameters as described in the picture.

CloudMonix - proactive reboots
CloudMonix can also execute and auto-scale VM Scale Sets based on signals captured anywhere in the Azure environment, e.g. CPU and memory utilization, ASB queues lengths, etc. Learn more in this article.