[英]Vertical auto-scaling Azure VM
Recently, i have been introduced to Azure and i have an application that is using high CPU (almost 80%) during morning hours between 9 am to 1 pm. 最近,我被介绍给Azure,并且我有一个应用程序在上午9点至下午1点之间的早晨使用高CPU(几乎80%)。 After that the CPU utilization is reduced to a minimal of 10% the whole day. 之后,整天将CPU利用率降低到最少10%。 So in order to reduce my cost i was thinking to implement vertical auto-scaling in my application. 因此,为了降低成本,我正在考虑在应用程序中实现垂直自动缩放。 When i read more on this i could find automation account and RunBook as the only way but my need is that is there any other way to implement Vertical auto-scaling in Azure IaaS VM apart from automation account? 当我阅读更多内容时,我可以找到自动化帐户和RunBook作为唯一方法,但是我需要的是除自动化帐户之外,还有其他方法可以在Azure IaaS VM中实现垂直自动缩放吗? If Yes, please share the approach. 如果是,请分享方法。
Yes you can use Azure PowerShell and/or the Azure CLI to execute scaling commands on a VM. 是的,您可以使用Azure PowerShell和/或Azure CLI在VM上执行扩展命令。 Here are some PowerShell examples: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/resize-vm?toc=%2Fazure%2Fvirtual-machines%2Fwindows%2Ftoc.json 以下是一些PowerShell示例: https : //docs.microsoft.com/zh-cn/azure/virtual-machines/windows/resize-vm?toc=% 2Fazure%2Fvirtual-machines%2Fwindows% 2Ftoc.json
You would then just have to schedule the script to run either locally or in an Azure service like Functions, Container Instances or etc. 然后,您只需要安排脚本在本地运行或在Azure函数(如Function,Container Instances等)中运行。
If you wanted to scale vertically a single VM based on a performance metric (CPU, memory, etc.) you can use the classic metric alerts system to do that. 如果要基于性能指标(CPU,内存等)垂直扩展单个VM,则可以使用经典指标警报系统来实现。 When those alerts fire based on thresholds you set you can invoke a webhook OR Logic App to trigger execution of a script or ARM Template. 当这些警报根据您设置的阈值触发时,您可以调用webhook或Logic App来触发脚本或ARM模板的执行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.