Woocommerce Menu

Azure Resource Cost Optimization

Introduction

Cloud usage in 2022 continue to grow and it has been also identified on this report. At the same time cloud cost going higher and higer while amount of waste is remain higher. Therefore we must always focus on waste of resources while we are in the cloud. Because it charges you based on resource usage/allocation. When it comes to Azure, you can get an initial idea of cost for each resources at Azure pricing calculator. But it’s difficult to find the document, which indicate how we can optimize resource usage and allocation by yourself. Therefore I thought of sharing few tips and tricks for azure cost optimization on mostly used resources in Azure cloud platform

App Services

  1. Sharing App Service plan in between App Services
  2. Auto switching between different tiers within same app service plan depending on usage
  3. Using deployment slots to maintain different environment(Dev, QA, UAT)

Database

  1. Auto scale up and down depending on usage time line

App Service: Sharing App Service plan

One of the smartest and greatest feature that I can see in Azure App service is App service plan. Because App service plan holds the resources(Ram, Cores, Storage) allocated through selected service tier. As resources are allocated to App Service Plan, Azure allows us to share same App Service plan with multiple app services so that same set of resources are used by multiple app services. As an example if UAT environment is rarely used by your client, we can share UAT app service plan with QA or Dev app service to reduce cost. All these should be done by carefully analyzing the app service usage. Please note that in order to share app service plan with multiple app services, all those resources should be in same web space. You can find web space at below location. Therefore if you are planning to share resources, when you are creating resource, you must associate them with same resource group and the region, Then azure creates your resource within same web space.

App Service: Auto switching between different tiers within same app service plan

This will be explained in this post as several steps should be fallowed to configured it

App Service: Using deployment slots to maintain different environment

Basically deployment slots are introduced to do the deployment to separate slot so that production slot can be kept unattended when doing deployment. But you can use same app service to hold different deployment slots for each development environments(Dev, QA, UAT) that you have. In this case also same App service plan is shared in between each environment. Therefore you will be charged only for one app service. This can be done as you can have separate configuration per each slot. Please not that in order to use this feature, your App Service should be in Standard app service plan or above. At the same time please note that, increased usage of single environment might get effected to other environments as same resources are shared for each slot.

Database: Auto scale up and down depending on usage timeline

This will be explained in this post as several steps should be fallowed to configured it

Conclusion

These suggested approaches can be followed in your Dev, QA and UAT environment for sure as you know access pattern of these environments. At the same time you can consider applying it to your production environment by carefully analyzing the usage and the traffic patterns of the environment. This will allow you to save considerable amount of dollars for your client, so that your client can spend those dollars for project/product to carry out development, which will be beneficial for you indirectly. 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *