Based on insights from Gartner peer reviews, 22% of enterprise organizations with revenues ranging from 50 million to 1 billion dollars in IT services, manufacturing, and banking industries prefer utilizing Azure App Services for hosting their applications.
As enterprise organizations invest a significant portion of their Azure Infrastructure budget into Azure App services, crafting strategies to optimize App Service spend would be crucial to reducing the overall Azure cost and keeping it under control.
In this blog article, I will guide you through a step-by-step process, starting from auditing your Azure App Service costs to implementing optimization measures that yield immediate cost savings.
It is important to understand the factors that is potentially contributing to the Azure App Service plan cost.
The cost of Azure App Service Plan depends on several factors as below,
- Pricing Tier
It has various pricing tiers such as Free, Shared, Basic, Standard, Premium, and Isolated to run workloads and accommodate performance requirements. In non-prod environments, it is recommended to scale resources from higher tier to Free or Basic when not in use. - Compute Resources
Azure App Service plan cost is determined by the compute resources, including CPU and memory, allocated to each tier.Usually, it is hard to choose the right plan during resource deployment, and users might end up provisioning higher tier to avoid performance issues. It is necessary to optimize the resources based on application requirements and usage behaviour.
- Instance Scaling
The scaling configuration must be bi-directional (scale-in and scale-out) based on the application need; if you use only one part of the combination, then it is not optimal to realize cost savings. - Deployment Slot Usage
It is often observed that teams create multiple deployment slots in the testing and staging environments, which are left unattended after their purpose of creation.
1. Right size Azure App Service
Assume you have chosen Premium plan P2V2 to host your web application based on the initial computation estimate needs. Over time, as your application usage fluctuates, you could notice that the chosen plan might be either over-provisioned or under-provisioned.
So, it becomes necessary to constantly review the application performance and optimize its pricing tier and instances.
Real-time challenges in right-sizing resources with Azure portal:
Manual Analysis: You must manually check the CPU and Memory usage of each App Service Plan by manually navigating through the resources
Lack of customization: While most cost management tools typically provide recommendations based on standard metrics like CPU and memory usage, this approach may be less effective.
Why? Because the resource requirements across applications differ, with some being more memory-intensive and others placing a significant emphasis on disk I/O or network bandwidth.
For example, in a development environment requiring high disk space and minimal CPU/memory usage, recommendations based on disk performance metrics would be more relevant for optimizing resources.
2. Audit the unused resources
Auditing the existing environment resource usage could help you reduce up to 30% of the App Service Plan cost.
Real-time challenge in auditing unused resources with Azure portal:
Unclear Business Usage: With unclear tagging, it is not easy to find if the resources are being used for business-critical operations or who owns them in the engineering team.
Without this clarity, even though you figure out that the resources are being unused, you will not be likely to delete it as you don’t know the dependencies.
3. Find the alternative within same pricing tier
Each pricing tier has its own set of SLAs and capabilities to host the web application. However, there are a range of subdivisions within the same tier, which could save you a significant portion of the amount if optimized properly.
For example, if you have provisioned a P2V2 App Service Plan but found only 50% of its capacity is used, then using a P1V2 tier would be appropriate to save half of the cost.
Real-time challenges in determining alternative tier with Azure portal:
Tier Forecasting: It is not feasible to manually investigate the historical data usage of each resource, estimate the computing power it requires, and decide on the right pricing plan.
4. Auto scale resources based on demand
Though auto scaling ensures cost efficiency by automatically scaling out the number of instances required to handle the demand and scale in, when the traffic is low. There is high possibility that the machine could scale out instance in response to the low-quality traffic that does not convert into business returns and exceed the budget. It is important to understand the multiple scaling rules in profile.
Real-time challenges in autoscaling resources with Azure portal:
Over-run budget: The app service plan may scale out exponentially responding to unintended or low-quality traffic and does not have proactive monitoring to alert on the anomaly.
Limited to instance scaling: The portal does not offer the capability to change the resource’s pricing tier. For example, changing the tier from Standard to Basic, if the resources are not in use during business off hours.
5. Beware of the associated cost
It is indeed important to understand that the bill will not only consider App Service as a line item but also accrue domain costs, IP-based certificate costs, storage account costs, virtual network costs, etc. These components will still spiral up the bill even after deleting the apps in the App Service.
Real-time challenge in identifying resources dependency with Azure portal:
Lack of correlation: The Azure portal does not provide a clear view of the dependency of a resource, which could lead to excessive costs even after deleting the primary resources.
6. Consider Reservation for long-time commitments
If there are App Services that are being projected to be used for a year or more, you shall opt to reserve for either a year or 3 years, which will save up to 60% from your current cost.
Real-time challenge in committing reservation with Azure portal:
Limited forecast insight: It is important to have utmost clarity on the usage, purpose, and real savings of the App Service in the business context to confidently commit on reserving the resource. With limited insights, it is often difficult to convince the executive team to commit to the Reservation.
Serverless360 Cost Analyzer is an intelligent Azure cost management platform which provides the existing Azure cost management capabilities as well as advanced features to overcome the above-mentioned challenges in the Azure portal.
It supercharges your Azure cost savings up to 60% from your current Azure bill and let us see how Serverless360 compliments the Azure portal in overcoming the above-described challenges:
1. Automated analysis of CPU and Memory usage to right size resources
Serverless360 automatically scans through your Azure environment, understand the optimal usage of CPU and memory to provide the rightsizing recommendations.
With this, you can skip the manual analysis and implement the recommendations in a click of a button.
2. Customization option on the right-sizing recommendation based on multiple metrics but not limited to CPU and Memory
Serverless360 allows you to configure right-sizing recommendations based on various metrics like disk I/O and network bandwidth.
With this hyper customization, you get highly relevant recommendation that suits your business needs and really impact in reducing the App Service Plan cost.
3. Get precise insights into business unit cost irrespective of the tagging quality
As soon as you get onboarded into Serverless360, the primary action you would take is grouping the cost into desired groups either using tags, subscriptions, resources, resource type and more to mirror business dimension costs.
Further, Serverless360 automates the process of creating cost groups to significantly reduce the amount of time it takes to set up.
With these insights, you can now have cost intelligence of various business costs like cost per customer, cost per team, and cost per product per feature, which facilitates to implement showback policy.
4.Proactively monitor the budget overruns and alert the cost centre owners
With the intelligence of cost per business unit, you can proactively monitor the cost anomalies if there is any unexpected cost spike. The system automatically predicts the unusual spending events and alerts the stakeholders.
5. Forecast the real savings of purchasing reserved instances with historical data
You can now efficiently forecast the potential business unit cost. For instance, you can now easily predict what would be the forecasted cost of a particular team or product based on historical data and take decisions confidently to commit on Reservation to with real saving insights.
6. Automatically scale up or down resources based on the business peak time, saving up to 70%
One of the quickest ways to reduce costs in non-production environments is to scale down the resource’s pricing tier to Free or Basic when idle and scale up during active hours.
Serverless360 gives an out-of-the-box capability to achieve this strategy and help you save up to 70% cost in your non-production environment.
7. Easily delete the associated services with complete reference
In spite of deleting the unused resources, teams may witness a portion of the cost from the purged resource contributing to the overall bill. Use, they may not have taken the associated resources with the primary one into consideration. Serverless360 gives you insights into the dependent resources which you can use to reduce costs.
Sign up for a free trial and see for yourself why Serverless360 is the best Azure cost management platform.