How we can decrease utilization of azure resources in night time?? (For specific time).

Shrikant Alone 20 Reputation points
2023-08-04T11:37:44.69+00:00

Basically, we have a total 2 VM machine, some azure functions and sql database. we got to reduce our cost. My question is can we decrease Azure resources cost at night time.???

Azure SQL Database
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,690 questions
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,702 questions
Azure Cost Management
Azure Cost Management
A Microsoft offering that enables tracking of cloud usage and expenditures for Azure and other cloud providers.
3,279 questions
Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,350 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Alberto Morillo 34,651 Reputation points MVP
    2023-08-04T13:01:34.6233333+00:00

    You can stop (deallocate) your Azure VMs during periods of time that they are not in use (at night or during weekends and holidays). You can automate that using Azure Automation as explained here.

    With Azure SQL Databases you can scale down the service tier during non-working hours and scale up the service tier again the next right before starting the working business hours. You can use PowerShell and Azure Automation to scale your databases as needed.

    Regarding Azure Functions, you basically pay for what you use.


  2. Oury Ba-MSFT 20,716 Reputation points Microsoft Employee
    2023-08-10T21:55:35.73+00:00

    Shrikant Alone

    I would recommend going to Azure SQL Database serverless compute tier.

    Serverless is a compute tier for single databases in Azure SQL Database that automatically scales compute based on workload demand and bills for the amount of compute used per second. The serverless compute tier also automatically pauses databases during inactive periods when only storage is billed and automatically resumes databases when activity returns. The serverless compute tier is available in the General Purpose service tier and currently in preview in the Hyperscale service tier.

    Please read more below for a better understanding.

    Serverless compute tier for Azure SQL Database

    Performance configuration

    You can set up an auto-paused delay which is a configurable parameter that defines the period of time the database must be inactive before it is automatically paused. The database is automatically resumed when the next login or other activity occurs. Alternatively, automatic pausing can be disabled.

    In addition to the above

    For optimal cost efficiency in predictably timed size needs – Azure Automation with a PowerShell runbook (https://learn.microsoft.com/en-us/azure/automation/learn/automation-tutorial-runbook-textual) coupled with the Set-AzSqlDatabase cmdlet can perform the daily scale up/down.

    Sample: https://learn.microsoft.com/en-us/azure/azure-sql/database/scripts/monitor-and-scale-database-powershell?view=azuresql-db

    Cmdlet reference: https://learn.microsoft.com/en-us/powershell/module/az.sql/set-azsqldatabase?view=azps-10.2.0

    Hope that is helpful.

    Regards,

    Oury


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.