DEV Community


Posted on

Azure SQL Cost Savings using Serverless

One simple way to reduce your Azure SQL costs is to check your actual usage of your DBs occasionally and monitor usage.

If they fall into one of the following categories:

  • Intermittent and also low usage
  • Responsiveness is not critical

You can consider switching them over to vCore Serverless.

Of course, there are some other factors to consider:

  • As this is pay-per-usage model, if you suddenly have a surge in usage, this might exceed the costs that you were originally paying when using provisioned compute model
  • After a period of inactivity/idleness, there will be some delay as it will need time warm-up before you can use
  • Serverless option is only available on the General Purpose service tier

Another reason to consider Azure SQL Serverless is that ability to auto-scale compute power. This is useful for scenarios where sudden spikes in workload activity are expected. This can also be done by manual scaling in the provisioned model, however it can get considerably more expensive.

Also, according to official Microsoft docs, every 100 DTUs is equivalent to roughly 1 vCore.

DTU to vCore conversion

At time of writing, in terms of costs,

200 DTUs = 2 VCore = $294.37 per month
2 VCores (Serverless) is roughly around $0.01 per second / $0.60 per min / $36 per hour (Hence will get around 8 hours of 2 VCores)

Hence if your workload only requires 2 VCores for < 8 hours per month (And assuming no other workloads), then it will cost less.

Ultimately, I think it is best to try both models to be able to accurately gauge which model is best for cost-savings. Run each model for a month/months to compare.

Both models can easily be interchangeable at any time via the Azure Portal, hence this is worth the try.

Official documentation to learn more:

Top comments (1)

leonardpuettmann profile image
Leonard Püttmann

That's a great tip. Looking forward to more!