I haven’t seen your Azure environment (yet!) but I’m sure there’s a good chance databases are the second biggest source of costs – right after virtual machines (which I suggest you minimize as much as possible).
Database migration is a critical part of cloud modernization projects and, alongside VMs, databases are often created without much architectural change from long-established on-premises patterns.
This inevitably leads to unwanted, and also, unnecessary spending; database instances are typically created without careful planning or a review of the new opportunities made available by using cloud native methods.
Provisioned vs. Serverless Options
Consider, for example, Azure SQL, one of the most popular platform offerings.
Take a look at this configuration, which is fairly common:
As configured, this SQL server database is using a general purpose tier that’s pre-provisioned – i.e., always running and billed per hour at a fixed rate based on vCore tier. The rate can be altered by applying credits such as the hybrid benefit and applying an already purchased license but let’s focus on architectural choices.
Even quiescent, the database generates approximately 340 Eur per month – and that’s with very little storage used and no activity:
Now, consider the use of a serverless SQL database in which “compute resources are auto-scaled. Billed per second based on vCores used” –
Of course, the estimated charge of 4.80 Eur would inevitably increase based on usage and wouldn’t be the final monthly charge for a working database. Even so, the baseline charge is lower and the cost calculation method is designed for cost optimization. Provisioned databases, which generate costs based on a fixed calculation of vCore utilization, are almost guaranteed in most scenarios to produce greater spending.
Not One Size Fits All: Think Strategically
Cloud technology, fully utilized, offers opportunities for both flexibility and strategic thinking. There are, for example, situations in which a provisioned database makes perfect sense and the costs can be considered an investment because the underlying business use-cases and expected ROI justify that cost. And there are other scenarios that are ideal for serverless databases.
The key is to ask the right questions such as:
- Are we choosing the right technology for the use-case?
- Have we thoroughly examined the available options?
- Do we have a cloud spending doctrine to guide us? (An example of a doctrine is a consistent consideration of estimated cost, based on factors such as architectural choice, budget and revenue targets and expected ROI)
Here’s an excellent guide from Microsoft to help you make the right choice: