Note: I'll be focusing on Azure Cloud and SQL Server, but these considerations are valid for any Cloud/DB Vendor.
Whenever people talk about “The Cloud” I often hear: “cloud is expensive” and, sooner or later, “if performance aren’t good we can scale up in minutes later” .
The mindset of taking care of performance issue by scaling up/down cloud resources is a golden egg goose for cloud providers, and a money sink for businesses.
Let’s take databases as an example, let’s assume to run a 24/7 application, the simplest and cheapest Cloud option on Azure is Azure SQL DB:
As you can see from the pricing page, for a general purpose Gen 5 service, prices for a middle/high tier DB offering are the following:
|Cores||RAM||Cost/Hour||Yearly Cost||Yearly Cost Difference vs Previous Tier||Yearly Cost Difference vs Previous Tier %|
|18||91.8||3.8742 €||33979.99 €|
|20||102||4.3047 €||37709.17 €||3771.18 €||10%|
|24||122.4||5.1656 €||45250.66 €||7541.48 €||16.67%|
|32||163.2||6.8875 €||60334.50 €||15083.84 €||25%|
|40||204||8.6094 €||75418.34 €||15083.84 €||20%|
A single step up for a single DB can cost from 10% to 25% more than the previous sizing, which translates in 15K or more when dealing with higher specs databases; remember that this is for a single scale up, on a single DB, on a single year.
It’s easy to understand that if your database and/or queries are not well tuned because “scaling will take care of it eventually”, then, you’ll be secretly bleeding money.
Before scaling up, evaluate whether the performance wall that you’re hitting is due to an objectively higher load on the application, or if the pain can be optimized away; if you didn’t have a Developement DBA watching over your application devs it’s pretty much guaranteed to be the second case.
The best results in term of performance optimization, of course, come when the Application and the Database team(s) come together in the early stages of development and both understand how to implement the features to satisfy requirements in a cloud-oriented way.
By performance tuning cloud databases and application, you save money and, moreover, get the nice bonus of an application that’s running smoothly for your customers, win/win.
“Scaling up” should be a temporary fix to allow your DBA & Devs to verify if there is a problem (and correct it) while the application is still up and running. If there is nothing wrong with your queries or application, congratulations!, you definitely have an higher demand, which should mean that you have a bigger revenue, therefore, you can afford to scale up.