October 10, 2017 // By Stuart Williams
The Microsoft Azure Cloud is a powerful and effective platform for delivering and supporting business functionality, but like all pay-as-you-go resources it’s a good idea to balance what needs to be done with an eye to the cost. Register for our next webinar on October 26th to learn more.
Here are some cost control areas to be mindful of that will be covered at length in the webinar:
- Know how much you spend
- Know your application profiles
- Don't leave unused resource running
- Be at the right scale
- Consolidate Resources
- Migrate to PaaS
- Other ideas
Each is discussed below.
Know how much you spend
You can’t manage what you don’t measure has never been truer than on the cloud.
To understand the data (easily available as downloadable spreadsheets, via the azure portal, or in premade reports and dashboards in PowerBI), the resources have to be rationally organized:
- Insist on, and follow, a naming convention for all Azure resources
- Group resources by business unit into subscriptions (within the same enrollment) and then into resource groups, ideally by environment
- This decomposition will show up in billing reports which will make it easier to understand what each system costs in each environment, and the cost of each component within that system
Know your application profiles
An important cost driver is the efficiency of the systems hosted in Azure. Underperforming system cost money in the form of resource consumption which in a pay-as-you-go platform such as a cloud is important.
Here are a good set of steps for assessment and correction:
- Collect performance and usage metrics. These are most effective when correlated so that the cost and time per interaction can be computed e.g. A web service call that does a query against a database should capture the call times and resource usage from the web, through the call stack and over the wire to the Database and back. Correlation information allows these call chains to be tracked from beginning to end.
- Evaluate this data selecting out poor performing call chains for analysis and remediation paying especial attention to any call chains that cause problems for the business
- This process should be ongoing as an organizational process to drive toward a goal of sustained engineer via a culture of “constant, and never-ending improvement” (CANEI)
Don't leave unused resource running
My dad always griped about leaving the lights on. In the same spirit cloud resources that are unused should be turned off.
Here are some common strategies:
- Know which resources cost money when idle (or cost almost nothing) and which are very expensive per hour so you can focus on the expensive ones
- Azure Dev/Test Labs can be used to turn VMs on and off on a schedule as VMs that are powered down don’t cost run-time resources
- For expensive resources that are used infrequently but not all the time (like HDInsight Clusters), script their spin-up and tear down using Azure’s Desired State Configuration (DSC) tools, so you can provision them on demand and then tear them down when done
- For Azure Application Services, delete unused staging slots after the deployment is successful (again consider scripting this)
Be at the right scale
Like Alice, being neither too big or too small is desirable. Azure has many facilities related to scaling, here are some examples:
- Azure VM scale-sets allow for scaling VMs to match the workloads
- Azure container hosts have facilities for scaling as well
- Azure Application Services scale though the associated Azure Service Plan
These facilities can be configured to scale up or down based on demand.
Resource consolidation can have multiple benefits including management, here are a few consolidation choices:
- For Azure SQL (PaaS) consider using the Azure Pooling Wizard to group Azure SQL instances into one or more shared pools
- For applications, services, and functions hosted in Azure Services, remember that these can share an Application Service Plan, which can save money
- Consider moving applications to Service Fabric or containers which can provide efficiencies as well as potential cost savings
It’s good to bear in mind that not all resource when consolidated result in cost savings, Azure Storage Accounts are a good example.
Here is a summary of other potential cost saving areas:
- Migrate to PaaS which can save money and offer considerable capabilities
- Consider Caching to reduce IO
- Don't use deprecated features (they cost more, and can be vulnerable)
- Leverage your Enterprise Agreement (EA)
Want to hear more? Attend our webinar.