Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Prepare applications for Azure deployment by generating infrastructure code, Dockerfiles, and config files.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/services/app-service/scaling.md
1# App Service Auto-scaling23## Basic Auto-scale Configuration45```bicep6resource autoScale 'Microsoft.Insights/autoscalesettings@2022-10-01' = {7name: '${webApp.name}-autoscale'8location: location9properties: {10targetResourceUri: appServicePlan.id11enabled: true12profiles: [13{14name: 'Auto scale'15capacity: {16minimum: '1'17maximum: '10'18default: '1'19}20rules: [21{22metricTrigger: {23metricName: 'CpuPercentage'24metricResourceUri: appServicePlan.id25timeGrain: 'PT1M'26statistic: 'Average'27timeWindow: 'PT5M'28timeAggregation: 'Average'29operator: 'GreaterThan'30threshold: 7031}32scaleAction: {33direction: 'Increase'34type: 'ChangeCount'35value: '1'36cooldown: 'PT5M'37}38}39]40}41]42}43}44```4546## Common Metrics4748| Metric | Use Case |49|--------|----------|50| CpuPercentage | CPU-bound workloads |51| MemoryPercentage | Memory-intensive apps |52| HttpQueueLength | Request queue depth |53| Requests | Request volume |5455## Recommendations5657| Workload | Min | Max | Metric |58|----------|-----|-----|--------|59| Production API | 2 | 10 | CPU + Requests |60| Dev/Test | 1 | 3 | CPU |61| High-traffic | 3 | 20 | HTTP Queue |6263## SKU Requirements6465Auto-scaling requires **Standard (S1+)** or **Premium** tier.66