Skip to content

Event driven Logic App and Functions App that can scale-up or scale-down the capacity of your Azure database service instance

License

Notifications You must be signed in to change notification settings

NoOps-jp/azure-database-scaler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

azure-database-scaler

Event driven Azure Logic App & Functions App that scale-up or scale-down the capacity of your Azure database service instance

Targets Azure Databases to scale in this project:

What to scale up/down?

How to scale up/down?

  • azure-database-scaler starts changing vCore capacity or Storage size when it was triggered by Azure Monitor Metric Alerts (Alerts providers must be either Microsoft.DBforMySQL or Microsoft.DBforPostgreSQL)
  • azure-database-scaler scale-up or scale-down the number of vCore within the same database tier & the same compute generations (Gen4 / Gen5) of your instance in the way like:
    • Basic Tier: 1 <-> 2
    • General Purpose Tier: 2 <-> 4 <-> 8 <-> 16 <-> 32
    • Memory Optimized Tier: 2 <-> 4 <-> 8 <-> 16 <-> 32
  • azure-database-scaler only scale-up the Storage size (Not scale-down supported). It can increase the Storage size by the amount of StorageScaleupSize(GB) parameter value to specify in project config file for each scale-up action triggered by Azure Monitor Metric Alerts until the Storage size reaches MaxStorageScaleLimit(GB) parameter value to specify in project config file. MaxStorageScaleLimit(GB) should be within the follwoing storage size range:
    • Basic Tier: 5 GB to 1 TB (1024 GB)
    • General Purpose Tier: 5 GB to 2 TB (2048 GB)
    • Memory Optimized Tier: 5 GB to 2 TB (2048 GB)

Alert Metrics, Alert Operator, and Actions to be triggered

Alert Metric Metric display name Operators to match Action
cpu_percent CPU percent GreaterThan or GreaterThanOrEqual scale-up vCore capacity
cpu_percent CPU percent LessThan or LessThanOrEqual scale-down vCore capacity
storage_percent Storage percent GreaterThan or GreaterThanOrEqual scale-up Storage size
storage_used Storage used GreaterThan or GreaterThanOrEqual scale-up Storage size
storage_limit Storage limit GreaterThan or GreaterThanOrEqual scale-up Storage size

For the detail on the supported metrics, please see supported metrics for Azure Database for MySQL or supported metrics for Azure Database for PostgreSQL

Architecture:

Relevant Services:

Documents