Home > Blockchain >  How to auto scale web apps vertically
How to auto scale web apps vertically

Time:03-29

I can see in Azure portal there is a nice UI to scale instances automatically.
Is there a way to change an app plan automatically?

For example, I may want to move from P1V2 to S1 during out of business hours, then scale back up again in the morning.

If there is no way to do it via the portal, I'm open to using APIs to change the app plans via a schedule functions or logic app if anyone can provide an example.

Any other suggestions are also welcome.

Thanks.

CodePudding user response:

Is there a way to change an app plan automatically?

Not like there is a way to do so horizontally by using auto-scale. You can, however, accomplish this using Azure Automation.

Azure Automation delivers a cloud-based automation, operating system updates, and configuration service that supports consistent management across your Azure and non-Azure environments. It includes process automation, configuration management, update management, shared capabilities, and heterogeneous features.

Your scenario is explicitly mentioned under Common scenarios.

Azure resource lifecycle management - for IaaS and PaaS services.

  • Resource provisioning and deprovisioning.
  • Add correct tags, locks, NSGs, UDRs per business rules.
  • Resource group creation, deletion & update.
  • Start container group.
  • Register DNS record.
  • Encrypt Virtual machines.
  • Configure disk (disk snapshot, delete old snapshots).
  • Subscription management.
  • Start-stop resources to save cost.

Dev/test automation scenarios - Start and stop resources, scale resources, etc.

To set the App Service Plan, use Set-AzAppServicePlan from the Az.Websites module.

  • Related