Within a few minutes, your resources should be provisioned. Use the Web App and corresponding App Service Plan in the remainder of this tutorial.
A list of the resources under your subscription that support autoscale are listed here. Identify the App Service Plan that was created earlier in the tutorial, and click on it.
On the autoscale setting, click the Enable Autoscale button.
The next few steps help you fill the autoscale screen to look like following picture:
Set the instance count to 1. This setting ensures that when no other profile is active, or in effect, the default profile returns the instance count to 1.
Click on the Add a scale condition link under the default profile.
Edit the Name of this profile to be 'Monday to Friday profile'.
Ensure the Scale mode is set to 'Scale based on a metric'.
For Instance limits set the Minimum as '1', the Maximum as '2' and the Default as '1'. This setting ensures that this profile does not autoscale the service plan to have less than 1 instance, or more than 2 instances. If the profile does not have sufficient data to make a decision, it uses the default number of instances (in this case 1).
For Schedule, select 'Repeat specific days'.
Set the profile to repeat Monday through Friday, from 09:00 PST to 18:00 PST. This setting ensures that this profile is only active and applicable 9AM to 6PM, Monday through Friday. During all other times, the 'Default' profile is the profile the autoscale setting uses.
In the 'Monday to Friday profile'.
Click the Add a rule link.
Set the Metric source to be 'other resource'. Set the Resource type as 'App Services' and the Resource as the Web App created earlier in this tutorial.
Set the Time aggregation as 'Total', the Metric name as 'Requests', and the Time grain statistic as 'Sum'.
Set the Operator as 'Greater than', the Threshold as '10' and the Duration as '5' minutes.
Select the Operation as 'Increase count by', the Instance count as '1', and the Cool down as '5' minutes.
Click the Add button.
This rule ensures that if your Web App receives more than 10 requests within 5 minutes or less, one additional instance is added to your App Service Plan to manage load.
We recommended you always to have a scale-in rule to accompany a scale-out rule. Having both ensures that your resources are not over provisioned. Over provisioning means you have more instances running than needed to handle the current load.
Set the Time aggregation as 'Total', the Metric name as 'Requests', and the Time grain statistic as 'Average'.
Set the Operator as 'Less than', the Threshold as '5' and the Duration as '5' minutes.
Select the Operation as 'Decrease count by', the Instance count as '1', and the Cool down as '5' minutes.
Save the autoscale setting.
To trigger the scale-out condition in the autoscale setting just created, the Web App must have more than 10 requests in less than 5 minutes.
Open a browser window and navigate to the Web App created earlier in this tutorial. You can find the URL for your Web App in the Azure Portal by navigating to your Web App resource and clicking on the Browse button in the 'Overview' tab.
In quick succession, reload the page more than 10 times.
From the left-hand navigation pane, select the Monitor option. Once the page loads select the Autoscale tab.
From the list, select the App Service Plan used throughout this tutorial.
On the autoscale setting, click the Run history tab.
You see a chart reflecting the instance count of the App Service Plan over time.
In a few minutes, the instance count should rise from 1, to 2.
Under the chart, you see the activity log entries for each scale action taken by this autoscale setting.
The scale-in condition in the autoscale setting triggers if there are fewer than 5 requests to the Web App over a period of 10 minutes.
Ensure no requests are being sent to your Web App.
Load the Azure Portal.
In a few minutes, the instance count should drop from 2, to 1. The process takes at least 100 minutes.
Under the chart, are the corresponding set of activity log entries for each scale action taken by this autoscale setting.
From the left-hand menu in the Azure portal, click All resources and then select the Web App created in this tutorial.
On your resource page, click Delete, confirm delete by typing yes in the text box, and then click Delete.
Then select the App Service Plan resource and click Delete.
Confirm delete by typing yes in the text box, and then click Delete.
Zendesk Theme Designed by Diziana
Copyright © Diziana. All Rights Reserved