none
AutoScale not working properly RRS feed

  • Question

  • I have an app Service and I set it to autoscale up based on CPU.  I put the target CPU between 65-80.  If the CPU goes over 80, it should scale up.  However, when I set this, my service got overloaded and unresponsive while never scaling up.  What I dont get is how do I even know what the CPU is if they dont even give that as a metric in the Monitor dashboard.  They only give CPU time.  I know my CPU had to have went way above 80 because the system was unresponsive and when I scaled it up manually it came back up.  How should I know the best way to Autoscale my service?

    Thanks

     

    KL

    Wednesday, March 23, 2016 3:51 PM

Answers

  • Your Web App runs in an App Service Plan, you can find the CPU Metric by looking at the Plan:

    The problem is scaling by CPU is that you can be having heavy load and the CPU isn't really pushing it, it might be a problem of the amount of requests you are receiving. Each instance has a maximum amount of request it can handle per second, then, it Enqueues requests, this is where the "Http Request Queue" metric is for. In our experience, handling sites with spikes of 4000 requests per second, scaling by this metric is better than scaling by CPU. Both metrics can be viewed on the App Service Plan.

    When defining the scaling strategy, keep in mind that you also set the Duration, which means the amount of time during which the scaling condition has to occur.

    Wednesday, March 30, 2016 12:01 AM

All replies

  • Hello KL,

    What App service plan are you using?

    You may check what scale operations took place at the time using the “Audit Logs”.

    1. From the Azure Portal > Click on Browse -> Select “Audit logs”
    2. You can click on filter to filter by subscription or resource group
    3. Select the Scale operation and review.

    For more information please check the link below:
    https://azure.microsoft.com/en-in/documentation/articles/stream-analytics-operation-logs/

    Also ensure that you have selected the appropriate “Duration (Minutes)” for the Scale Up from the Scale Rule.

    You may check the link below which addresses similar issue
    https://social.msdn.microsoft.com/Forums/azure/en-US/22a31d91-b23a-47ce-bfb0-88c07eaf800f/does-autoscale-not-work?forum=windowsazuremanagement


    Regards,
    Ajay

    Thursday, March 24, 2016 2:49 PM
    Moderator
  • I'm using the Standard Plan.  I have it check the CPU percentage, however, it does not give me CPU percentage as a metric to even check in the monitor dashboard, so that doesn't even make sense.  I need to know when my server is under heavy load.  What metric should I use to determine that, and how can I visually see that in the monitor dashboard.  

    Thanks


    KL

    Thursday, March 24, 2016 3:40 PM
  • Hi

    There's a "cool down" timer on the scale up/down. Can this be the issue? The way it works is you provide a value in seconds for the fabric to wait before executing the scale operation. You might want to reduce the value to see a quicker effect.

    Hope this helps!

    Mert

    Monday, March 28, 2016 7:44 PM
  • Your Web App runs in an App Service Plan, you can find the CPU Metric by looking at the Plan:

    The problem is scaling by CPU is that you can be having heavy load and the CPU isn't really pushing it, it might be a problem of the amount of requests you are receiving. Each instance has a maximum amount of request it can handle per second, then, it Enqueues requests, this is where the "Http Request Queue" metric is for. In our experience, handling sites with spikes of 4000 requests per second, scaling by this metric is better than scaling by CPU. Both metrics can be viewed on the App Service Plan.

    When defining the scaling strategy, keep in mind that you also set the Duration, which means the amount of time during which the scaling condition has to occur.

    Wednesday, March 30, 2016 12:01 AM
  • Looks like it was the http queue.  Looking at that metric and it was into the thousands.  When I updated the app to scale by queue > 100, the scaling is kicking in, and the app performance is much more stable.

    Thanks


    KL

    Saturday, April 2, 2016 2:12 PM
  • Hello KL,

    Thank you very much for posting the steps that worked for you, this will certainly help others experiencing similar issue.

    Regards,
    Ajay

    Tuesday, April 5, 2016 1:51 PM
    Moderator