Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Auto-Scale Database

I am using the Azure Cloud Services with a single Azure Database. I have the pricing tier set to S4 which gives me 200 DTUs and 250GB. The issue is that all of my worker and web roles are set to auto-scale with load except for the Database. When I do a load-test, everything up-scales automatically until the Database starts choking on queries which is causing a bottle-neck.

There isn't any auto-scaling options for Databases that I can find. I found this video from Microsoft: Azure SQL Database dynamically scale-up or scale-down

but it basically says that you need to go to your Azure portal and manually scale-up to a larger pricing tier. It doesn't mention anything about automatically scaling up or down.

I also looked into Elastic Pools but these seem to be more for using many Databases at the same time, rather than just 1 Database.

So my question is:

How do you automatically scale-up and down a single Azure database?

like image 886
hcham1 Avatar asked Mar 26 '18 14:03

hcham1


People also ask

Which Azure SQL offering supports automatic database scaling?

Azure SQL Database serverless automatically scales compute for single databases based on workload demand and bills for compute used per second. Serverless also provides an option to automatically pause the database during inactive usage periods when only storage costs are billed.

What is automatic tuning in Azure SQL Database?

Automatic tuning is a fully managed intelligent performance service that uses built-in intelligence to continuously monitor queries executed on a database and automatically improve their performance. This is achieved through dynamically adapting a database to changing workloads and applying tuning recommendations.

How long does it take to scale a database in Azure?

How long would it take to scale up and down a compute replica? Scaling compute up or down typically takes up to 2 minutes regardless of data size.

Does Azure have a data modeling tool?

Data Modeling in Azure is a new preview service in Microsoft Azure where semantic Data Models can be hosted. Users in your organization can then connect to your Data Models via tools such as Excel, Power BI, and others to generate reports and perform ad-hoc data analysis.


1 Answers

You have several options like Alberto mentioned you can use REST API and Of course azure run-books/webhooks to configure the alert rules.

Let me explain my process here.

  1. Deploy the azure run-books for the changing the performance tier in AzureAutomation -Try this
  2. Create some webhooks for triggering your run-books anytime -Webhooks for Azure runbook
  3. From your SQL DB, create an alert rule with the condition when DTU used greater than or equal to some value (say 1600) the call the corresponding webhook to change the tier dynamically.

enter image description here

like image 154
Jayendran Avatar answered Sep 27 '22 23:09

Jayendran