אירוע
17 במרץ, 21 - 21 במרץ, 10
הצטרף לסידרה של פגישות כדי לבנות פתרונות מדרגיים של בינה מלאכותית בהתבסס על מקרי שימוש מהעולם האמיתי עם מפתחים ומומחים אחרים.
הירשם עכשיוהדפדפן הזה אינו נתמך עוד.
שדרג ל- Microsoft Edge כדי לנצל את התכונות, עדכוני האבטחה והתמיכה הטכנית העדכניים ביותר.
הערה
We recommend that you use the Azure Az PowerShell module to interact with Azure. To get started, see Install Azure PowerShell. To learn how to migrate to the Az PowerShell module, see Migrate Azure PowerShell from AzureRM to Az.
When using App Service, you can scale your apps by scaling the App Service plan they run on. When multiple apps are running in the same App Service plan, each scaled-out instance runs all the apps in the plan.
Per-app scaling can be enabled at the App Service plan level to allow for scaling an app independently from the App Service plan that hosts it. This way, an App Service plan can be scaled to 10 instances, but an app can be set to use only five.
הערה
Per-app scaling is available only for Standard, Premium, Premium V2, Premium V3, and Isolated pricing tiers.
Apps are allocated to available App Service plan using a best effort approach for an even distribution across instances. While an even distribution is not guaranteed, the platform will make sure that two instances of the same app will not be hosted on the same App Service plan instance.
The platform does not rely on metrics to decide on worker allocation. Applications are rebalanced only when instances are added or removed from the App Service plan.
Create a plan with per-app scaling by passing in the -PerSiteScaling $true
parameter to the New-AzAppServicePlan
cmdlet.
New-AzAppServicePlan -ResourceGroupName $ResourceGroup -Name $AppServicePlan `
-Location $Location `
-Tier Premium -WorkerSize Small `
-NumberofWorkers 5 -PerSiteScaling $true
Enable per-app scaling with an existing App Service Plan
by passing in the -PerSiteScaling $true
parameter to the
Set-AzAppServicePlan
cmdlet.
# Enable per-app scaling for the App Service Plan using the "PerSiteScaling" parameter.
Set-AzAppServicePlan -ResourceGroupName $ResourceGroup `
-Name $AppServicePlan -PerSiteScaling $true
At the app level, configure the number of instances the app can use in the App Service plan.
In the example below, the app is limited to two instances regardless of how many instances the underlying app service plan scales out to.
# Get the app we want to configure to use "PerSiteScaling"
$newapp = Get-AzWebApp -ResourceGroupName $ResourceGroup -Name $webapp
# Modify the NumberOfWorkers setting to the desired value.
$newapp.SiteConfig.NumberOfWorkers = 2
# Post updated app back to azure
Set-AzWebApp $newapp
חשוב
$newapp.SiteConfig.NumberOfWorkers
is different from $newapp.MaxNumberOfWorkers
. Per-app scaling uses $newapp.SiteConfig.NumberOfWorkers
to determine the scale characteristics of the app.
The following Azure Resource Manager template creates:
The App Service plan is setting the PerSiteScaling property
to true "perSiteScaling": true
. The app is setting the number of workers
to use to 5 "properties": { "numberOfWorkers": "5" }
.
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters":{
"appServicePlanName": { "type": "string" },
"appName": { "type": "string" }
},
"resources": [
{
"comments": "App Service Plan with per site perSiteScaling = true",
"type": "Microsoft.Web/serverFarms",
"sku": {
"name": "P1",
"tier": "Premium",
"size": "P1",
"family": "P",
"capacity": 10
},
"name": "[parameters('appServicePlanName')]",
"apiVersion": "2015-08-01",
"location": "West US",
"properties": {
"name": "[parameters('appServicePlanName')]",
"perSiteScaling": true
}
},
{
"type": "Microsoft.Web/sites",
"name": "[parameters('appName')]",
"apiVersion": "2015-08-01-preview",
"location": "West US",
"dependsOn": [ "[resourceId('Microsoft.Web/serverFarms', parameters('appServicePlanName'))]" ],
"properties": { "serverFarmId": "[resourceId('Microsoft.Web/serverFarms', parameters('appServicePlanName'))]" },
"resources": [ {
"comments": "",
"type": "config",
"name": "web",
"apiVersion": "2015-08-01",
"location": "West US",
"dependsOn": [ "[resourceId('Microsoft.Web/Sites', parameters('appName'))]" ],
"properties": { "numberOfWorkers": "5" }
} ]
}]
}
Per app scaling is a feature that is enabled in both global Azure regions and App Service Environments. However, the recommended strategy is to use App Service Environments to take advantage of their advanced features and the larger App Service plan capacity.
Follow these steps to configure high-density hosting for your apps:
PerSiteScaling
flag to true on the App Service plan.אירוע
17 במרץ, 21 - 21 במרץ, 10
הצטרף לסידרה של פגישות כדי לבנות פתרונות מדרגיים של בינה מלאכותית בהתבסס על מקרי שימוש מהעולם האמיתי עם מפתחים ומומחים אחרים.
הירשם עכשיוהדרכה
אישור
Microsoft Certified: Azure for SAP Workloads Specialty - Certifications
להדגים תכנון, העברה והפעלה של פתרון SAP ב- Microsoft Azure תוך שימוש במשאבי Azure.