Optimizing Azure Costs
The course is part of these learning paths
Microsoft Azure provides a variety of cloud services in a variety of cloud service models: IaaS, PaaS, and SaaS. When businesses migrate to the cloud, they must choose which model is best suited to their needs and is the most cost-effective. This course is designed to assist Cloud Architects in identifying their current Azure expenditures and providing greater awareness of the costs associated with each deployment model as well as each aspect of an Azure deployment.
Optimizing Azure costs begins with knowing your current Azure expenditures. This course introduces you to the tools built into the Azure Portal that can help you understand the total overall expenditures in Azure as well as break down those costs by area: Compute, Network, Storage, Identity, and App/Cloud Services.
The remainder of the course drills down on specific costs associated with each area of Azure identifies the costs associated with each service and provides very clear and concise methods for reducing Azure expenditures. Many of the cost savings methods will require minimal changes to your Azure deployment and will take just minutes to implement while other cost savings methods may take a shift in your Azure strategy, such as moving from Iaas to PaaS. By the end of this course, you will have gained a thorough understanding of how charges are incurred, how to reduce or even avoid some of the charges, and you will have learned how to significantly reduce overall Azure expenditures and get the most out of what is spent in your Azure deployment.
- Identify current Azure expenditures
- Optimize compute costs
- Optimize network costs
- Optimize storage costs
- Optimize identity costs
- Optimize App Service and Cloud Service costs
- Azure architects who are exploring options for reducing their Azure spending
- People preparing for Microsoft’s AZ-301 exam
- Good understanding of Azure administration and management
Related Training Content
For more content related to MS Azure, visit our Content Training Library.
Microsoft offers several different App Service plans that provide everything needed to create websites, mobile backends, and web-APIs for any platform. By choosing the right App Service plan, you can save money on your Azure costs over hosting web services on IaaS virtual machines. App Service plans are offered in six tiers: Free, Shared, Basic, Standard, Premium, and Isolated. The Free plan can host up to 10 web, mobile or API apps and provides one gigabyte of disk space. It does not, however, offer staging slots, auto scale capability, or custom domain support. Therefore, it's not suitable for production environments and in some cases, may not even work in development environments. The Shared plan can host up to 100 web, mobile or API apps, provides one gigabyte of disk space, and supports custom domain names. This is an excellent plan for development environments for most companies.
The Basic plan hosts an unlimited number of web, mobile or API apps, provides 10 gigabytes of disk space, custom domain name support, and up to three instances. This is a suitable plan for production environments where the workload is not expected to exceed the resources provided by those three instances. Additionally, the instances are hosted on B-series virtual machines, offering up to four CPU cores and seven gigabytes of RAM. The Standard plan hosts an unlimited number of web, mobile or API apps, provides 50 gigabytes of disk space, and up to 10 instances. This is the lowest priced plan that also offers the Auto Scale feature. Instances are stored on S-series virtual machines, offering up to four CPU cores and seven gigabytes of RAM. The Premium plan hosts an unlimited number of web, mobile or API apps, provides 250 gigabytes of disk space and otherwise has the same feature set as the Standard Plan, except that up to 20 premium instances are hosted on P-series virtual machines, offering up to four CPU cores and 14 gigabytes of RAM. The Isolated plan offers the same feature set as the Premium except it provides one terabyte of disk space, up to 100 instances and it supports Network Isolation. Isolated instances are hosted on I-series virtual machines offering up to four CPU cores and 14 gigabytes of RAM.
Of course, the cost per hour increases as you move up to these higher tiers and with a higher performance of virtual machine instances. The best approach to cost savings is to purchase two plans. One for development and testing and the other for your production environment. The shared plan is optimal for development and testing. Microsoft also offers discounted Azure pricing for Visual Studio subscribers to run development and testing workloads. There are discounts for individuals, Enterprise Agreement customers and for development teams. For more information, refer to the URL shown here. One way to reduce development and testing costs is to remove the Azure App Service plan hosting your development testing environment when it is no longer needed. This of course will terminate the hourly billing for that service plan. For the production plan, you'll need to have a clear understanding of the workloads and their storage, CPU, and memory requirements. In many cases, the best cost savings can be achieved by purchasing a single App Service plan to host all of your web apps, rather than hosting them in individual App Service plans. Most businesses will want to leverage the autoscale feature, which will automatically scale up and down the number of running instances based on any desired metric.
This feature is only available in Standard, Premium, and Isolated instances. Keep in mind that the cost per hour for the Standard plan is about 25% higher than that of the Basic plan. Also, note that App Service plan costs are fixed regardless of the number of running instances or number web apps hosted within the plan. Azure Cloud Services is another platform Azure Service offering. Like Azure App Service, it is designed to support applications that are scalable, reliable, and inexpensive. The key difference between Azure App Service and Cloud Service is that with the Cloud Service you have more control over the virtual machines hosting your services. You can install your own software on Cloud Service VMs and access them remotely. Within your Cloud Service, you can deploy web roles and worker roles as needed. The Cloud Service will also contain the storage needed for your web app deployment. A Cloud Service instance then is essentially a container for your web app deployment. Cloud Service plans like App Service plans are available in different tiers that allow you to choose a plan that best suits the demands of your application.
Within each tier, you'll need to choose the instance size. Cost is charged on an hourly basis. Generally, the cost is comparable to hosting on an App Service plan except that you have access to the virtual machines. You can stop and deallocate the instances running in your Cloud Service plan as well. This stops the clock for billing purposes. At the very least, non-production resources in your Cloud Services could be deallocated during non-working hours. Another way to reduce Cloud Service costs is to delete staging slots when no longer needed. Staging slots provide an easy method to systematically deploy a newer version of a web application. With two staging slots, one production and one development, you can quickly swap the slots, moving your development web app to production. It's important to note that every slot, whether it's production, development or anything else resides on its own instance and incurs hourly charges.
By deleting non-production staging slots after a swap, you'll no longer incur those hourly charges. This is quite different from Azure App Services which also includes staging slots but does not have an additional charge for them. In some cases, businesses may feel the need to locate their resources in multiple regions in order to provide an optimal experience for their customers or employees. While this is the most obvious way to host resources local to the consumers, it is not the most cost-effective approach since the resources in each region will incur very similar, if not identical, charges. A better solution might be to use Content Distribution Networks to host your static content. Azure Content Delivery Networks work with Web App, media services, storage, and Cloud Services.
A Content Delivery Network, known as a CDN, is a distributed network of servers that can deliver web content to consumers. CDNs store cached content in point of presence locations, that are close to the users. The point of presence locations is defined in what is known as a CDN profile, which identifies endpoints for cached content. CDN is priced based on output data transfers per month and the service tier. The Premium tier offers additional features over the Standard tier, including a rules engine and real-time analytics. The Acceleration Data Transfers tier accelerates web content that can't be cached like search results, shopping carts, and any other dynamic content. In most cases, CDNs offer a less expensive approach to localizing web content, than does hosting services at multiple regions.
About the Author
Jeff is a technical trainer and developer residing in Arizona, USA. He has been a Microsoft Certified Trainer for the past 18 years, providing in-house development and training on Microsoft server operating systems, PowerShell, SQL Server and Azure. When he’s not developing and delivering courses on Azure, he’s photographing galaxies, nebulae and star formations from his computer-automated observatory in Chino Valley, Arizona using a 14” Schmidt Cassegrain telescope.