Microsoft Azure

Virtual Machines Forum

How to efficiently manage VM scaling in Azure for fluctuating workloads?

Posted by: Azure_User123 on Oct 26, 2023, 10:15 AM (UTC) | 45 Views | 3 Replies
AU
Hi everyone, I'm working on an application hosted on Azure Virtual Machines that experiences significant traffic fluctuations throughout the day. I'm currently using a basic VM scale set but I'm struggling to find the optimal configuration for scaling rules to match demand without over-provisioning or causing performance issues during peak times. What are the best practices for configuring autoscale rules for VMSS? I'm considering using custom metrics, but I'm not sure which metrics are most indicative of load for my specific application (web app with a database backend). Any insights or examples of successful scaling strategies would be greatly appreciated!
Report
MM
Hello Azure_User123, This is a common challenge. For web applications, common metrics to monitor for scaling include:
  • CPU Percentage: A good general indicator of load.
  • Memory Percentage: Important if your application is memory-intensive.
  • Network In/Out: Can be useful for high-throughput applications.
  • HTTP Queue Length: If you have access to application-specific metrics, this can be a strong signal.
For VM Scale Sets, you can leverage Azure Monitor and configure autoscale rules based on these metrics. Consider setting scale-out rules based on CPU percentage exceeding 70% for a sustained period (e.g., 5 minutes), and scale-in rules when it drops below 30%. Adjust these thresholds based on your application's performance testing. You can also explore the Azure Advisor recommendations for VMSS scaling, which might offer tailored suggestions.
Report
RS
I've found that using a combination of CPU percentage and request queue length (if your web server exposes it) provides the most accurate scaling. CPU alone can sometimes be misleading if the bottleneck is I/O or something else. Also, remember to set cooldown periods for your autoscale rules to prevent rapid scaling up and down, which can be inefficient and costly. A 5-10 minute cooldown is usually a good starting point.
Report

Reply to this topic