You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, you scale App Service apps by scaling the [App Service plan](overview-hosting-plans.md) they run on. When multiple apps are run in the same App Service plan, each scaled-out instance runs all the apps in the plan.
25
+
When using App Service, you can scale your apps by scaling the [App Service plan](overview-hosting-plans.md) they run on. When multiple apps are run in the same App Service plan, each scaled-out instance runs all the apps in the plan.
26
26
27
-
You can enable *per-app scaling* at the
28
-
App Service plan level. It scales an app independently from the
29
-
App Service plan that hosts it. This way, an App Service plan
30
-
can be scaled to 10 instances, but an app can be set to use only five.
27
+
*Per-app scaling* can be enabled at the App Service plan level to allow for scaling an app independently from the
28
+
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.
31
29
32
30
> [!NOTE]
33
31
> Per-app scaling is available only for **Standard**, **Premium**, **Premium V2** and **Isolated** pricing tiers.
34
32
>
35
33
34
+
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.
35
+
36
+
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.
37
+
36
38
## Per app scaling using PowerShell
37
39
38
-
Create a plan with per-app scaling
39
-
by passing in the ```-PerSiteScaling $true``` parameter to the
40
-
```New-AzAppServicePlan``` cmdlet.
40
+
Create a plan with per-app scaling by passing in the ```-PerSiteScaling $true``` parameter to the ```New-AzAppServicePlan``` cmdlet.
# Modify the NumberOfWorkers setting to the desired value.
69
69
$newapp.SiteConfig.NumberOfWorkers = 2
70
-
70
+
71
71
# Post updated app back to azure
72
72
Set-AzWebApp $newapp
73
73
```
@@ -133,29 +133,21 @@ to use to 5 `"properties": { "numberOfWorkers": "5" }`.
133
133
}
134
134
```
135
135
136
-
## Recommended configuration for high density hosting
137
-
Per app scaling is a feature that is enabled in both global Azure regions
138
-
and [App Service Environments](environment/app-service-app-service-environment-intro.md). However, the recommended strategy is to
139
-
use App Service Environments to take advantage of their advanced features and the larger
140
-
pools of capacity.
141
-
142
-
Follow these steps to configure
143
-
high density hosting for your apps:
144
-
145
-
1. Configure the App Service Environment and choose a worker pool that is dedicated to the high density hosting scenario.
146
-
2. Create a single App Service plan, and scale it to use all the available
147
-
capacity on the worker pool.
148
-
3. Set the `PerSiteScaling` flag to true on the App Service plan.
149
-
4. New apps are created and assigned to that App Service plan with the
150
-
**numberOfWorkers** property set to **1**. Using this configuration yields the
151
-
highest density possible on this worker pool.
152
-
5. The number of workers can be configured independently per app to grant
153
-
additional resources as needed. For example:
154
-
- A high-use app can set **numberOfWorkers** to **3** to have more
155
-
processing capacity for that app.
156
-
- Low-use apps would set **numberOfWorkers** to **1**.
157
-
158
-
## Next Steps
136
+
## Recommended configuration for high-density hosting
137
+
138
+
Per app scaling is a feature that is enabled in both global Azure regions and [App Service Environments](environment/app-service-app-service-environment-intro.md). However, the recommended strategy is to use App Service Environments to take advantage of their advanced features and the larger App Service plan capacity.
139
+
140
+
Follow these steps to configure high-density hosting for your apps:
141
+
142
+
1. Designate an App Service plan as the high-density plan and scale it out to the desired capacity.
143
+
1. Set the `PerSiteScaling` flag to true on the App Service plan.
144
+
1. New apps are created and assigned to that App Service plan with the **numberOfWorkers** property set to **1**.
145
+
- Using this configuration yields the highest density possible.
146
+
1. The number of workers can be configured independently per app to grant additional resources as needed. For example:
147
+
- A high-use app can set **numberOfWorkers** to **3** to have more processing capacity for that app.
148
+
- Low-use apps would set **numberOfWorkers** to **1**.
149
+
150
+
## Next steps
159
151
160
152
-[Azure App Service plans in-depth overview](overview-hosting-plans.md)
161
153
-[Introduction to App Service Environment](environment/app-service-app-service-environment-intro.md)
0 commit comments