I have a SQL Database in Azure. An S0 instance with 10 DTUs. This is enough 95% of the time.
However, when the App Service plan scales out (can go up to 20x in rare cases), I need 200/400 DTUs. Since this will not happen very often, so it would be a waste to always pay for these sizes. Is there a way to scale out the database when the app service scales out?
Thank you!
Answer
There's no direct way to have a DB scale up when a Web App does, but there is a workaround. You can have the scale up action on the web app trigger a webhook, so you can have that call either Azure Automation or an Azure Function, which then talks to the ARM API to scale up or down your SQL DB.
See here to see how to trigger a webhook on scaling.
No comments:
Post a Comment