Compute Design and Auto Scaling
IntermediateLesson 3 of 8 in Cloud Architecture and Administration Course
What you will learn
- Read instance type names on AWS, Azure and Google Cloud, match instance families to what a workload actually uses, and size an instance from measured demand with planned headroom.
- Read instance families and size namesDecode instance type names on the three major clouds and match each family to the resource a workload uses most.
- Size an instance from measured demandFind the resource that limits a workload, choose a size with headroom, decide between scaling up and scaling out, and use burstable types only where their credit model fits.
- Read instance families and size names
- Spread virtual machines across fault domains, availability sets, placement groups and availability zones, and plan capacity so a workload keeps serving when a rack or a whole zone fails.
- Spread VMs with availability sets and placement groupsUse fault domains, update domains, Azure availability sets and AWS and Azure placement groups to control how instances share hardware inside one data center.
- Deploy across availability zones and plan for zone lossDistribute instances across availability zones, read zone names correctly and size capacity so the workload still meets its peak when one zone fails.
- Spread VMs with availability sets and placement groups
- Build AWS Auto Scaling groups, Azure Virtual Machine Scale Sets and Google Cloud managed instance groups, choose scaling policies and metrics, and tune them so capacity follows demand quickly and safely.
- Build a scaling group or scale setDefine the template, capacity limits, zones, health checks, load balancer links and update method of a group of interchangeable instances.
- Choose and configure a scaling policyCompare target tracking, step, simple, scheduled and predictive scaling, write Azure autoscale rules, and pick a metric that really tracks load.
- Tune scaling speed and safe scale-inShorten the time from rising load to ready capacity, prevent overshoot, and remove instances without dropping work.
- Build a scaling group or scale set
- Run containers on managed services, design serverless functions that start fast and respect concurrency limits, and decouple components with queues and events so each part scales on its own.
- Run containers on managed container servicesStore images in a registry, run them on Azure Container Instances, Azure Container Apps, Amazon ECS with Fargate or Google Cloud Run, and size and scale them for the load.
- Design serverless functions for performanceConfigure function memory, timeouts and concurrency, reduce cold starts, and choose an Azure Functions hosting plan that fits the workload.
- Decouple components so each part scales on its ownPlace queues, topics and event buses between components, process messages safely when they arrive more than once, and scale consumers on the backlog.
- Run containers on managed container services
- Configure App Service plans and similar app hosting services for scale and performance, and release new versions without downtime through deployment slots, swaps and traffic splitting.
- Configure App Service plans and other app hosting servicesChoose an App Service tier, scale a plan up or out, set the options that affect performance, and compare App Service with Elastic Beanstalk, App Engine and Cloud Run.
- Release new versions with deployment slotsDeploy to a staging slot, swap it into production with warm-up and the right slot settings, roll back, and route part of the traffic to a new version.
- Configure App Service plans and other app hosting services
- Plan performance tests with clear targets and realistic load, run them with load testing tools, read the results to find bottlenecks, and confirm that scaling settings keep up.
- Plan performance tests with clear targetsChoose the right kind of test, define pass criteria with latency percentiles, model realistic load, and prepare an environment and tools that give trustworthy results.
- Find bottlenecks and tune scaling from test resultsRead client and server metrics together, locate the resource that limits throughput, check that autoscaling keeps up, and change one thing at a time.
- Plan performance tests with clear targets
Auto Scaling study guide
1Choose and size compute instances for a workload
A compute choice commits you to a bundle of CPU, memory, disk and network capacity. The family name helps you find candidates, but measurements decide which one fits. Read the naming patterns on AWS, Azure and Google Cloud, check processor compatibility, then work from peak demand to a size with headroom. You will also decide when a larger machine helps and when several interchangeable machines are the better design.
1.1 Read instance families and size names
An instance type bundles virtual CPUs (vCPUs), memory, network capacity and sometimes local disks or accelerators. Azure calls it a VM size; Google Cloud calls it a machine type. A size word describes a position within a family, not one universal amount of memory.
Match the resource balance
| Family | Resource emphasis | Typical workload |
|---|---|---|
| General purpose | Balanced CPU and memory, often about 4 GiB per vCPU | Web services with balanced demand |
| Compute optimized | More CPU per unit of memory, often about 2 GiB per vCPU | CPU-heavy processing |
| Memory optimized | Often 8 GiB or more per vCPU | Large caches and in-memory data |
| Storage optimized | Fast local disk input/output | Heavy local data processing |
| Accelerated | GPUs or other accelerators | Graphics, video and machine learning |
These ratios guide a search; the exact type specification decides what you receive. A vCPU also is not a universal physical core. On many x86 types it is one hardware thread; on AWS Graviton it is a full physical core.
Decode the provider names
In AWS c7gn.xlarge, c means compute optimized, 7 is the generation, g means Graviton Arm, n means network optimized, and xlarge is the size. Common series include m for general purpose, t for burstable, r for memory, x and u for high memory, i and d for storage, p for GPU and g for graphics. Options include a for AMD, i for Intel, d for local disks, e for extra resources and z for high CPU frequency. Position matters: the initial g in g5.xlarge means graphics; the later g in m7g.xlarge means Graviton.
Within the M7g family, large, xlarge and 2xlarge give 2/8, 4/16 and 8/32 vCPUs/GiB. Other steps differ: 8xlarge to 12xlarge grows from 32/128 to 48/192, a 50% increase. At xlarge, C7g, M7g and R7g each have 4 vCPUs but 8, 16 and 32 GiB respectively.
Azure Standard_D4ds_v5 means D family, 4 vCPUs, local temporary disk (d), Premium SSD support (s) and version 5. Families B, D, F, E, M, L and N cover burstable, general, compute, memory, very large memory, storage and GPU uses. N includes NC for compute and NV for visualization. Feature letters include a for AMD, p for Arm, l for lower memory and m for more memory. Compare F4s_v2, D4s_v5 and E4s_v5: each has 4 vCPUs, with 8, 16 and 32 GiB.
Google Cloud n2-standard-8 identifies series N2, type standard and 8 vCPUs. E2/N2 standard, highmem and highcpu provide 4, 8 and 1 GB per vCPU, so n2-highmem-8 has 64 GB. E2, N2, N4 and C4 are general purpose; C2 and H3 are compute optimized; M is memory optimized; A is accelerator optimized. Some series support custom CPU/memory combinations.
Check what can actually run
Arm choices include Graviton, Azure p sizes and Google C4A. Check every binary, container image and agent for arm64 support: an x86-only dependency blocks the move. Compare current generations for better performance per vCPU, and confirm the exact type exists in the deployment region and zones before choosing it.
Key Takeaways
- Read the family and size together; a size word alone does not determine memory.
- Check every dependency before moving a workload to Arm.
- Read AWS option letters by position and Azure numbers as vCPU counts.
- Confirm the exact type, generation and zone availability.
1.2 Size an instance from measured demand
Right-sizing selects the smallest type that meets the performance target with planned headroom. Collect CPU, memory, disk and network measurements over a representative period, including busy days. A two-week average can hide a daily peak that makes a smaller instance fail.
Find what runs out first
The binding constraint is the resource that limits useful work. An API at 85% CPU and 30% memory is a compute-family candidate. A cache at 20% CPU and 90% memory needs memory capacity. Low CPU with slow transfers can point to disk or network limits. Check the exact type’s baseline and maximum throughput: several smaller sizes may advertise the same “up to” burst limit.
Right-sizing recommendations from AWS Compute Optimizer or Azure Advisor help identify candidates. Guest memory measurements need an agent, such as the CloudWatch agent on EC2; the hypervisor does not see application memory use. Include expected growth that the recommendation cannot know.
Add headroom to each resource
Suppose an application peaks at 1.5 vCPUs of work and 6 GiB. Adding 25% to those measured peaks gives:
A 2-vCPU, 8-GiB general purpose type fits, such as m7g.large or Standard_D2s_v5. If memory instead peaks at 12 GiB, the memory requirement becomes 15 GiB. A 2-vCPU, 16-GiB memory type, such as r7g.large or Standard_E2s_v5, supplies that memory without buying unneeded CPU.
Choose a growth method
| Method | What changes | Design consequence |
|---|---|---|
| Scale up | Move to a larger instance | Useful for one-node software; size ceiling and restart risk remain |
| Scale out | Add instances that share work | Needs shared work distribution and state handling; can survive one instance failing |
Web copies usually sit behind a load balancer, workers share a queue, and stateful systems need replication or partitioning. Several medium instances can provide both growth and redundancy. On AWS, stop an EBS-backed instance before changing its type. Azure restarts a resized VM and may require deallocation if the size is unavailable on its hardware cluster. A rolling replacement through a group can keep other instances serving during the change.
Decide whether CPU credits fit
Burstable AWS T and Azure B types earn credits below a CPU baseline and spend them above it. On AWS, one credit funds one vCPU at 100% for one minute. A t3.medium has 2 vCPUs and a 20% baseline, earning 24 credits per hour. At 60% CPU it spends 72, so the net draw is 48 credits per hour. A balance of 576 lasts 12 hours at that load.
In standard mode, an empty balance restricts CPU to baseline. Unlimited mode, the default for T3 and later T families, allows extra usage with possible surplus charges. Mostly idle services with short bursts fit this model; sustained above-baseline work belongs on fixed-performance capacity. Before buying larger hardware, check for a slow query, lock contention or a memory leak that added CPU will not repair.
Key Takeaways
- Size from representative peaks and check CPU, memory, disk and network separately.
- Add planned headroom before choosing the smallest type that fits.
- Scale-out needs a way to share work and keep durable state off replaceable instances.
- Plan the restart or rolling replacement needed for a resize.
- Sustained CPU demand can exhaust credits or create surplus charges on burstable types.
2Place instances to survive hardware and data center failures
Availability depends on which failures can remove your running copies together. Rack placement, maintenance groups and availability zones address different failure sizes. Learn how each provider spreads instances, then calculate how much serving capacity remains when one domain disappears. The same design must account for the load balancer and dependent services, because a surviving web instance still needs a working path to its data.
2.1 Spread VMs with availability sets and placement groups
A fault domain groups hardware that shares a power source and network switch. An update domain groups VMs that can restart together during planned maintenance. Spreading service copies across both reduces the number lost to either event.
Use an Azure availability set
An availability set spreads related VMs across up to 3 fault domains and up to 20 update domains, with 5 update domains by default. Choose both counts when creating the set; they stay fixed. The set has no separate charge, though its VMs do. Use at least two VMs doing the same job.
Consider 7 web VMs across 3 fault domains and 5 update domains. Update domains fill in turn: VMs 1 and 6 share domain 0, VMs 2 and 7 share domain 1, and the other domains contain one VM each. Maintenance affects one update domain at a time, so at most 2 VMs restart together. A balanced fault-domain spread is 3, 2 and 2, so a fault can remove 3 VMs. The remaining 4 must support the required load.
A VM joins an availability set at creation. Moving an existing VM requires retaining its disks, deleting the VM and recreating it in the set. A VM cannot simultaneously belong to an availability set and be pinned to an availability zone.
For two or more VMs in one availability set, Azure’s VM SLA specifies 99.95% connectivity. A single VM with all disks on Premium SSD or Ultra Disk has a 99.9% figure; putting that lone VM in a set does not give it the multi-instance figure. An SLA is a service commitment, while your actual service also depends on routing, software and capacity.
Choose proximity or separation
| Placement choice | Arrangement | Useful when |
|---|---|---|
| AWS cluster group | Instances close together in one zone | Tightly coupled processing needs low latency and high throughput |
| AWS spread group | Each instance on a separate rack; at most 7 running instances per zone per group | A few critical servers need separate hardware |
| AWS partition group | Up to 7 partitions per zone that do not share racks | Replicated data systems can distribute replicas by partition |
| Azure proximity placement group | VMs physically close | Communication delay between VMs is the main concern |
For an AWS cluster group, launch the instances together using one instance type to reduce capacity-placement failures. Partition-aware systems such as Cassandra or HDFS can use partition information to avoid putting dependent replicas on shared racks.
Packing machines close improves communication but concentrates failure exposure. An availability set handles hardware and maintenance failures within a data center; it cannot carry the service through losing that entire data center. For new Azure designs, Flexible scale sets provide fault-domain or zone spreading plus autoscaling. Availability sets still serve existing workloads and regions without zones.
Placement also cannot separate copies from a common software error. A bad release, expired certificate or full disk can stop every copy. Release controls and health checks address failures that hardware separation leaves untouched.
Key Takeaways
- Fault domains concern shared hardware; update domains concern planned restarts.
- Size surviving capacity for the largest domain that can be lost.
- Availability sets protect within a data center; zones address a wider failure.
- Cluster and proximity groups favor communication speed; spread and partition groups favor separation.
- Create Azure VMs in their intended availability set.
- Hardware spreading leaves common software failures to other controls.
2.2 Deploy across availability zones and plan for zone loss
An availability zone contains one or more physically separate data centers with independent power, cooling and networking. Zones in a region communicate over low-latency links. AWS regions have at least three zones; zone-enabled Azure regions have at least three, while some Azure regions have none. Most Google Cloud regions have three or more.
Spread every required part
A zonal resource occupies one selected zone. A zone-redundant resource is distributed across zones by the platform. A resilient web tier needs instances in at least two zones and a zone-redundant load balancer. A database or cache confined to one zone can still stop the whole service.
Azure’s connectivity SLA for two or more VMs across two or more zones in one region is 99.99%. In a 30-day month, the downtime allowances corresponding to 99.9%, 99.95% and 99.99% are 43.2, 21.6 and 4.32 minutes. These figures describe the SLA calculation; enough surviving application capacity still has to be designed.
Zone labels need care across accounts. AWS us-east-1a can identify different physical zones in different accounts; an AZ ID such as use1-az1 identifies the same physical zone. Azure logical zones 1, 2 and 3 are mapped per subscription too.
Calculate capacity after a loss
Peak demand is 12,000 requests per second. One instance serves 800 at its target CPU. Required healthy capacity is:
With 5 instances in each of 3 zones, losing a zone leaves only 10 instances, serving 8,000 requests per second. To sustain peak immediately, distribute enough capacity that any two zones retain at least 15 instances. Equal placement needs:
Round up to 8 per zone: 24 total. The two surviving zones supply 16 instances. This is static stability: serving the failure case requires no new launches. The 24-instance design has 60% more instances than the 15-instance healthy-load minimum.
Separate placement from recovery
An AWS Auto Scaling group balances across the zones of its selected subnets. Select subnets in at least two zones; it replaces lost capacity in healthy zones and rebalances after recovery. Azure scale sets distribute across their listed zones, with best-effort or strict balancing. A regional Google Cloud managed instance group distributes across regional zones.
Azure zone spreading alone does not guarantee new instances will launch in healthy zones during an outage. Detect the event with Resource Health or Service Health alerts, configure a response using autoscale rules and a recovery runbook, and test it. Strict balancing can block an action that would create an imbalance.
Running only the normal-load minimum and launching replacements after a failure uses less idle capacity, but accepts a period of reduced service. It also relies on launch speed, quotas and spare capacity being available during the outage. Listing three zones with a minimum of two instances leaves at least one zone empty. Account for cross-zone latency and transfer charges when arranging chatty components, while keeping the user-serving tier spread across zones.
Key Takeaways
- A zone-resilient service needs a working load balancer and dependencies as well as spread instances.
- Calculate what survives a zone loss before relying on the normal-load instance count.
- Static stability carries peak load through failure without new launches.
- Zone distribution and zone-outage recovery are separate capabilities.
- Use physical zone identifiers for cross-account placement decisions.
3Scale out automatically with scaling groups and scale sets
An autoscaling design needs more than a CPU threshold. New instances must reproduce the application, pass health checks and become ready before demand outruns the running group. Capacity limits, policy choice and startup delays all shape the result. Build the group first, choose a signal that reflects work per instance, then tune launch and removal so the group can grow without overshooting or interrupting work already in progress.
3.1 Build a scaling group or scale set
A scaling group maintains interchangeable instances: an AWS EC2 Auto Scaling group, Azure Virtual Machine Scale Set, or Google Cloud managed instance group (MIG). Its template, limits, placement, health checks and traffic registration must work together.
Make replacement repeatable
An AWS launch template defines the image, type, security groups, user-data startup script and IAM instance profile. Azure uses the scale set VM model; Google Cloud uses an instance template. Build application setup into the image and startup process. A manual fix on one VM disappears when that VM is replaced. Store session data and uploads externally so scale-in cannot delete them.
AWS minimum and maximum bound the desired count. With minimum 2, maximum 10 and desired 4, a request for 12 stops at 10; a request to shrink to 1 stops at 2. Azure autoscale’s default count has a different job: if metrics cannot be read and current capacity is below the default, autoscale raises it to that fallback. It is not the ordinary target count.
Check the application and traffic path
AWS starts with EC2 status checks. Enable Elastic Load Balancing health checks to detect an application that fails while its VM still runs. The health check grace period allows startup before failed health checks count: the console default is 300 seconds, while CLI/SDK creation defaults to 0. Set it from observed startup behavior.
Azure automatic repairs use the Application Health extension or a load balancer probe. A MIG uses a health check for autohealing. Register new web instances with the load balancer, and use connection draining on removal. On AWS, the deregistration delay gives active requests time to finish.
Choose how instances are managed
| Azure mode | Instance model | Main distinction |
|---|---|---|
| Flexible | Standard Azure VMs | Recommended; supports mixed sizes and Spot/regular VMs, with fault-domain or zone spreading, up to 1,000 VMs |
| Uniform | Scale set instances managed through scale set APIs | Uses an identical-instance model |
Choose orchestration mode at creation; it cannot be changed later. Do not confuse this management choice with a zone-recovery guarantee.
A template change does not automatically replace every running instance. AWS instance refresh replaces batches while maintaining a minimum healthy percentage. With 20 instances and a 90% minimum healthy setting, 18 stay healthy and 2 can be replaced at a time when no extra surge capacity is used. Azure upgrade policies are Automatic, Rolling or Manual; Manual leaves existing instances unchanged until explicitly upgraded. MIG rolling updates set maximum surge and maximum unavailable.
Add interruptible capacity deliberately
Spot capacity can support stateless work above a regular-capacity base. AWS provides a two-minute interruption notice; Azure’s Scheduled Events warning is best effort, up to 30 seconds before eviction, so work must also survive no warning. Allow several suitable instance types so a shortage of one type does not halt growth. Keep minimum below maximum, and place the group across zones: a perfectly configured scaling policy cannot overcome a fixed count or a single-zone design.
Key Takeaways
- Put reproducible configuration in the template and durable state outside instances.
- AWS desired count and Azure default count serve different purposes.
- Application health checks detect failures that VM status checks can miss.
- Choose Azure orchestration mode at creation and plan how template changes reach existing VMs.
- Combine interruptible capacity with a regular base and recoverable work.
3.2 Choose and configure a scaling policy
A useful scaling policy responds to the amount of work each instance must do. Choose the signal before the threshold. CPU suits CPU-bound processing; requests per target suits web requests of similar cost; backlog per instance suits workers. Slow responses alone can come from a database, so latency is a poor main proportional scaling metric.
Match the policy to the demand
| Policy | Action | Good fit |
|---|---|---|
| Target tracking | Adjusts capacity to hold a metric near a target | Work per instance that falls as capacity grows |
| Step scaling | Adds larger adjustments for larger alarm breaches | Explicit response sizes for different load levels |
| Simple scaling | Makes one adjustment, then waits for cooldown | Older fixed-adjustment configurations |
| Scheduled | Changes capacity limits or counts at known times | Known events and regular opening hours |
| Predictive | Launches ahead of forecast demand | Cyclical demand and slow startup |
Manual scaling sets the count directly. Dynamic policies follow measured load; they often operate alongside a schedule or forecast.
With 6 instances at 90% CPU and a 60% target, proportional demand suggests:
The target-tracking service manages alarms and capacity changes. The metric must approximately halve when capacity doubles for unchanged total work. A step policy with an alarm at 60% might add 1 at 60–70%, 2 at 70–85%, and 4 above 85%; a 78% reading adds 2. AWS recommends target tracking or step scaling over simple scaling, whose default cooldown is 300 seconds.
Use schedules and forecasts
An Azure fixed-date profile applies to a specific event; a recurrence profile applies on selected weekdays; the default profile covers other times. Fixed-date takes priority over recurrence, then default. Raising the minimum before a known busy period gives instances time to start.
AWS predictive scaling needs at least 24 hours of history, analyzes up to 14 days and forecasts 48 hours ahead in hourly intervals. Check forecast-only mode before allowing launches. Predictive scaling does not scale in, so pair it with a dynamic policy. Azure also offers CPU-history-based predictive autoscale for scale sets.
Write rules that can grow and shrink
An Azure rule specifies the metric, time grain statistic, duration, time aggregation, comparison, threshold, action and cooldown. For example, average Percentage CPU above 70 over 10 minutes adds 1 instance, followed by 5 minutes of cooldown. A companion rule below 30 over 10 minutes can remove 1.
With multiple rules, Azure scales out when any outward rule fires and chooses the largest resulting count. It scales in only when all inward rules fire, removing the fewest instances requested. AWS also selects the policy that leaves the largest capacity when policies compete.
Avoid immediate reversals
Flapping occurs when a scale action creates the condition for its opposite. Two instances at 45% CPU become one at roughly 90% after a removal, assuming unchanged work. An out-above-70/in-below-50 pair would reverse that removal. Azure estimates the effect and may skip or reduce scale-in. Wider separation, such as 70% out and 30% in, makes the rules more stable.
Key Takeaways
- Choose a metric that reflects the workload’s limiting resource.
- Target tracking needs a metric that falls as serving capacity increases.
- Use schedules or forecasts when instances must be ready before a predictable peak.
- Pair growth policies with a way to scale in.
- Separate scale-out and scale-in thresholds to avoid reversals.
- Check how competing rules choose the resulting capacity.
3.3 Tune scaling speed and safe scale-in
A scaling action helps only when the new instance can serve real work. The delay includes metric collection and evaluation, launch, boot, application startup and warm-up. If those stages take 6 minutes while traffic doubles in 2, a reactive policy cannot cover the first wave by itself.
Reduce the readiness gap
Keep headroom with a lower utilization target or a higher minimum. Use scheduled or predictive capacity before known peaks. Prebuilt images reduce setup at launch. AWS warm pools keep pre-initialized instances stopped, running or hibernated; stopped instances still incur storage charges. Azure standby pools serve a similar purpose.
A cooldown waits after a scaling action. AWS’s default 300-second cooldown applies to simple scaling; Azure sets cooldown per autoscale rule. Too short a wait can cause repeated additions before their benefit appears. Too long a wait can delay a needed response to a second wave.
Default instance warmup on AWS controls when a new in-service instance’s metrics enter the group aggregate. Its capacity already counts while it warms, preventing repeated launches for the same shortfall, and scale-in waits for warmup. It is not enabled by default. AWS suggests 300 seconds as a starting point, then tuning to the application. This differs from a health check grace period, which delays acting on startup health-check failures.
Scale workers from waiting work
Backlog per instance divides waiting messages by running workers. For a worker processing one message at a time, divide acceptable queue delay by average processing time to get a target:
A 30-second delay budget and 0.5-second processing time allow roughly 60 waiting messages per worker. With 1,500 messages waiting:
Group limits and readiness time still constrain that estimate. Raw queue length alone cannot distinguish a backlog supported by many workers from the same backlog supported by few.
Remove instances without abandoning work
A web server stops receiving new traffic and drains active requests. A worker stops fetching messages, then finishes or releases what it holds. AWS lifecycle hooks can pause launch or termination for setup, log copying or draining; Azure offers terminate notifications. Long jobs need checkpoints or scale-in protection so removal does not lose progress.
AWS’s default termination policy first preserves zone balance, then favors old launch templates or configurations. Azure’s default balances zones and fault domains, then removes the highest instance ID; NewestVM and OldestVM are alternatives. AWS scale-in protection and Azure instance protection can preserve selected busy instances.
Check limits beyond the policy
A group maximum, regional vCPU quota or shortage of a particular type can stop growth. Raise quotas before an event, allow suitable alternative types and alert when the group remains at maximum. Test a load increase followed by a decrease: measure readiness time, then confirm draining, safe job completion and stable scale-in.
Key Takeaways
- Measure the full delay from increased load to useful capacity.
- Cooldown, instance warmup and health check grace period control different parts of scaling.
- For serial workers, target backlog per instance from delay budget divided by processing time.
- Drain requests and finish, release or checkpoint worker jobs before termination.
- Check group limits, quotas and type capacity before planned peaks.
4Design container and serverless workloads for performance
Managed containers and functions can grow quickly, but they still need resource limits, startup choices and a safe relationship with downstream services. Choose how the platform runs your code, then tune CPU, memory and concurrency from measurements. Queues and events let each part grow independently, while message handling must survive retries and duplicate delivery. Work through the tradeoffs between a fast response, waiting work and protected data services.
4.1 Run containers on managed container services
Managed container services take over different amounts of infrastructure work. Begin with a reproducible image: the application, libraries and runtime packaged together. Store it in Amazon ECR, Azure Container Registry (ACR) or Google Artifact Registry. Pin a never-reused version tag or a digest such as sha256:…; latest can make a scale-out mix code versions.
Choose a container service
| Service | Running unit | Scaling responsibility |
|---|---|---|
| Azure Container Instances | Container group sharing host, network and lifecycle | No built-in autoscale; run more groups |
| Azure Container Apps | Revision with replicas | Managed ingress and KEDA event-driven scaling |
| Amazon ECS service | Tasks from a task definition | Service scaling changes task count; EC2 capacity must also scale if used |
| Google Cloud Run | Container instances serving requests | Managed scaling based partly on request concurrency |
ACI bills by the second and supports Always, OnFailure and Never restart policies. Changing CPU, memory, OS type, restart policy or zone requires deleting and recreating the group. ACI and individual Fargate tasks suit simple jobs; Container Apps, Cloud Run and ECS services suit web services and workers. Teams needing the full Kubernetes API can choose managed Kubernetes with its added operational work.
Control registry access and resources
ACR Basic, Standard and Premium offer different capabilities; Premium adds geo-replication and private endpoints. ACR Tasks can build images with az acr build. Use managed identity for pulls: grant AcrPull on standard-permission registries, or Container Registry Repository Reader on ABAC-enabled registries.
An ECS task definition records image, CPU, memory, ports and IAM role. Fargate provides capacity per task; EC2-backed ECS needs an Auto Scaling group capacity provider too. Otherwise extra tasks can remain PENDING. Fargate requires valid CPU/memory pairs: 0.25 vCPU with 0.5–2 GB, 1 vCPU with 2–8 GB, or 16 vCPUs with 32–120 GB. If a task serves 250 requests per second, 3,000 requires 12 tasks; set maximum above that for headroom. Fargate Spot tasks are interruptible with a two-minute notice.
Tune replica counts and concurrency
Container Apps revisions default to minimum 0 and maximum 10 replicas. Rules can follow HTTP concurrency, TCP connections or custom signals such as queue length. The HTTP default is 10 concurrent requests per replica. A queue rule with target 20 messages per replica and 120 messages requests 6 replicas. Round fractional requirements up, then apply the limits.
Minimum 0 permits scale-to-zero with a suitable trigger. CPU and memory rules cannot wake an app from zero because there is no running replica to report those metrics. On Consumption, zero replicas have no replica usage charges; Dedicated workload profiles still bill allocated infrastructure. Minimum 1 or more reduces first-request startup delay.
Cloud Run’s new-service concurrency default is 80 in the console and 80 times vCPU count through gcloud or Terraform; the configurable maximum is 1,000. Higher concurrency packs requests into fewer instances but can increase contention. Minimum instances keep warm capacity; a maximum limits growth and downstream pressure. Split traffic across revisions for gradual releases.
Measure container CPU and memory. Too little CPU throttles processing; too little memory can cause termination and restart. Small images and brief startup routines reduce the delay before new replicas help.
Key Takeaways
- Deploy an immutable image reference so replacement instances run a known version.
- ACI group count, ECS task count and managed replica count are different scaling units.
- Use the registry role that matches its permission mode.
- Measure CPU, memory and concurrency before changing container size.
- Scale-to-zero needs a trigger that can observe work while no replica runs.
- Warm minimum capacity reduces startup delay but keeps resources allocated.
4.2 Design serverless functions for performance
A serverless function runs when an HTTP request, queue message, upload or schedule triggers code. AWS Lambda, Azure Functions and Google Cloud Run functions manage the execution infrastructure. Consumption-style hosting can scale to zero and charges by requests and memory-duration use; provisioned or always-ready capacity has an ongoing cost.
Balance memory, duration and concurrency
Standard Lambda functions support 128–10,240 MB memory, with CPU rising proportionally; 1,769 MB gives the equivalent of one vCPU. Their timeout is at most 900 seconds, or 15 minutes. Configurable /tmp storage ranges from 512 to 10,240 MB. This invocation limit applies to standard Lambda functions; the separate Managed Instances option has different limits.
More memory can make CPU-bound work faster. Compare 512 MB for 800 ms with 1,024 MB for 400 ms:
Both use 0.4 GB-seconds under the same memory conversion convention. At the same compute rate, the second completes twice as fast with the same memory-duration charge. Benchmark the actual function; doubled memory does not guarantee halved duration.
Concurrency is work running at once. At 400 requests per second and an average duration of 0.25 seconds:
The usual Lambda regional account concurrency quota is 1,000 and can be increased; new accounts can start with lower quotas. At 2,000 requests per second and 0.6 seconds, demand is 1,200 concurrent executions. If the available quota is 1,000, excess synchronous requests are throttled, typically with HTTP 429.
Separate a cap from warm capacity
Reserved concurrency both guarantees a function part of the account pool and caps it at that amount. It helps protect a database from too many simultaneous executions. Provisioned concurrency keeps environments initialized to reduce cold starts and is billed while configured.
A cold start loads code, starts the runtime and runs initialization before the handler. Keep packages small and create reusable SDK clients or connections outside the handler. Provisioned concurrency, SnapStart on supported Lambda runtimes and Azure always-ready instances reduce startup delay.
Choose Azure hosting and request behavior
| Azure Functions plan | Main performance choice |
|---|---|
| Flex Consumption | Recommended serverless plan; Linux, VNet integration, always-ready support; up to 1,000 instances; 512, 2,048 or 4,096 MB |
| Premium | Prewarmed capacity and longer executions |
| Dedicated | Runs on an App Service plan with allocated capacity |
| Container Apps | Hosts functions on the container platform |
| Legacy Consumption | Default timeout 5 minutes, maximum 10 |
An HTTP-triggered Azure function must respond within 230 seconds because of the front-end load balancer, even if execution timeout is longer. Accept long jobs quickly and continue through a queue or Durable Functions.
Keep durable state in a database, cache or object store; local memory and disks can disappear between invocations. Step Functions or Durable Functions coordinate multi-step work. Reuse connections and consider a proxy such as RDS Proxy, a concurrency cap or a queue: fast function scaling can otherwise overwhelm a database. For steady high-volume or long-running work, compare containers or VMs using measured demand.
Key Takeaways
- Benchmark memory and duration together; memory also changes Lambda CPU capacity.
- Concurrency equals arrival rate multiplied by average execution duration.
- Reserved concurrency caps and reserves; provisioned concurrency keeps environments warm.
- Azure HTTP response limits remain separate from function execution timeouts.
- Keep durable state external and limit downstream connection pressure.
4.3 Decouple components so each part scales on its own
A synchronous chain makes every caller wait for the next service. A slow processing stage can therefore hold open the user request and spread a failure upstream. Decoupling inserts messaging so producers can accept work while consumers process it at their own rate.
Match the delivery pattern
| Pattern | Delivery behavior | Examples |
|---|---|---|
| Queue | Competing consumers share messages; one handles each delivery | SQS, Service Bus queues, Azure Queue Storage |
| Publish/subscribe | Each subscription gets its own copy | SNS, Service Bus topics, Google Cloud Pub/Sub |
| Event routing | Events go to targets matching routing rules | EventBridge, Event Grid |
A queue fits work that can wait, such as producing a report. A password check normally needs an immediate answer, so adding a queue there changes the user interaction in an unhelpful way. Publish/subscribe fits separate services that each need to react to the same event, such as billing and notifications.
Separate a burst from a sustained shortfall
Suppose 5,000 orders are waiting after a burst, no new orders arrive, and workers complete 50 per second. The backlog clears in:
Customers can receive “order received” immediately while processing continues. This queue-based load leveling smooths a short peak. If arrivals continue at 20 per second, only 30 per second of worker capacity is left to reduce that initial backlog. If arrivals stay above total processing capacity, the queue keeps growing and consumers must scale or arrivals must be controlled.
Scale consumers with backlog per instance, a Container Apps KEDA queue rule, Lambda event source mapping or queue-triggered Functions. The message’s age is also useful when deciding whether users are waiting too long.
Make retries safe
Most messaging systems offer at-least-once delivery. The same message can arrive again; standard SQS also does not guarantee ordering. FIFO queues add ordering and duplicate-removal features, but application effects still need careful handling across failures.
An idempotent consumer makes repeated processing have the same effect as one successful processing. Record a stable order ID together with the completed effect, and skip a duplicate already committed. A separate “check then write” with no coordination can race when two deliveries run together.
During processing, SQS hides the message for a visibility timeout, 30 seconds by default; Service Bus uses a lock duration. If the message is not deleted before that period expires, it becomes available again. Set the period above processing time. For SQS feeding Lambda, AWS recommends at least six times the function timeout. Send messages that repeatedly fail to a dead-letter queue for inspection.
Return quickly for long work
With asynchronous request-reply, an API accepts a job and returns HTTP 202 Accepted plus a status URL. A client polls that URL or receives a callback when processing finishes. This handles work longer than an HTTP response can wait, including Azure’s 230-second front-end limit, while keeping the actual result distinct from the initial acceptance.
Key Takeaways
- Use a queue for shared work and publish/subscribe when each subscription needs a copy.
- A queue absorbs bursts; sustained arrivals still need enough processing capacity.
- Make business effects idempotent because a message can be delivered again.
- Allow enough visibility time and isolate repeated failures in a dead-letter queue.
- HTTP 202 acknowledges acceptance; the final result arrives separately.
5Host web apps on managed platforms and release them with deployment slots
A managed web platform handles much of the runtime, but the plan still determines which apps share compute and how they grow. Plan changes affect performance, while release settings decide whether a new version starts with the right configuration. Configure the hosting capacity first, then use staging, warm-up and gradual traffic changes to release code. A quick rollback also depends on keeping the database compatible with both versions.
5.1 Configure App Service plans and other app hosting services
Managed app hosting runs the operating system, runtime, patching and load balancing while you deploy code or a container. Azure App Service hosts web apps and APIs on Windows or Linux. Elastic Beanstalk builds visible EC2, Auto Scaling and load balancer resources from a code bundle. App Engine and Cloud Run offer Google Cloud alternatives.
Understand the shared plan
An App Service plan defines region, operating system, tier, size and instance count. In the normal shared-plan arrangement, each app runs across the plan’s instances and grows with the plan. Deployment slots, WebJobs and backups also consume those resources. Moving one resource-heavy app into its own plan separates its compute demand and scaling decisions.
| Tier | Scale and feature boundary |
|---|---|
| Free / Shared | Shared VMs with CPU-minute quotas; no scale-out |
| Basic | Dedicated instances; manual scale-out to 3; no autoscale or deployment slots |
| Standard | Up to 10 instances, autoscale and a 5-slot allowance |
| Premium v3 | Up to 30 instances and a 20-slot allowance on faster hardware |
| Isolated v2 | App Service Environment in a virtual network for isolation and high scale |
Scale size or count
Scale up changes tier or instance size, for example P1v3 to P2v3. It can supply more CPU/memory or unlock a feature. Scale out increases instance count. From Standard upward, Azure autoscale uses metric rules and schedule profiles. Premium automatic scaling is a separate HTTP-driven feature using prewarmed instances and a maximum per app.
An S1 plan with 2 instances hosts apps A, B and C. If CPU rules grow the plan to 8, all three apps normally run on 8 instances. If only A needs that many copies, use supported per-app scaling to limit B and C to 2, or move A to its own plan. Per-app limits do not give A separate underlying hardware from the other apps in that plan.
Keep serving instances ready
Always On keeps an app loaded through idle periods and is needed for continuous WebJobs. ARR affinity pins a client to one instance; stateless apps usually turn it off so load can spread. A health check path helps the platform remove failing instances from traffic and replace them. Supported zone-redundant plans distribute instances across zones.
Scale only after locating the bottleneck. Extra plan instances can share application load, but a slow query or memory leak still needs its own fix. Small apps sharing a plan also compete with a busy neighbor.
Configure the app’s public and private paths
Map a custom domain with a CNAME or A record and prove ownership using an asuid TXT record. Bind a TLS certificate using SNI: use an App Service managed certificate, an imported certificate or one held in Key Vault. Schedule backups of app content and configuration.
Access restrictions and private endpoints govern inbound access. Virtual network integration supplies an outbound path from the app to network resources. Keeping these directions distinct matters when a health check works publicly but the application cannot reach a private dependency.
Key Takeaways
- Apps and slots in one plan share its compute resources.
- Scale up changes size or tier; scale out changes the number of serving instances.
- Basic supports manual scale-out but does not supply autoscale or slots.
- Use readiness, affinity and zone settings to support the application’s traffic behavior.
5.2 Release new versions with deployment slots
A deployment slot is a live app with its own hostname on the production app’s plan. A staging slot can run the next version while production continues to serve. Production is itself a slot. Standard, Premium and Isolated support slots, with published allowances of 5, 20 and 20 respectively.
Prepare configuration before swapping
Some configuration travels with code; some stays attached to the slot.
| Behavior | Examples |
|---|---|
| Normally swaps with code | App settings and connection strings, framework versions, handler mappings and WebJobs content |
| Can be marked slot-specific | App settings and connection strings, such as a database connection |
| Stays with the slot | Custom domains, private certificates/TLS settings, scale settings, IP restrictions, Always On, diagnostics, CORS, managed identities and VNet integration |
Mark environment-specific connection strings as deployment slot settings so each slot retains its own final value. Otherwise an ordinary setting can travel with the application content.
Follow the swap sequence
Deploy version 2 to staging and test its own URL. During a swap, App Service first applies production’s slot-specific settings to the source instances and restarts them. After all restart, the platform warms each instance with an HTTP request. Only then does it switch routing. Production keeps serving during preparation, and its old version ends up in staging after completion.
A swap with preview pauses after production configuration has been applied to staging. Validate version 2 with that configuration, then complete or cancel. Because staging can reach production dependencies during this phase, use checks that avoid unintended business changes.
Warm-up should test real readiness. Configure applicationInitialization in web.config, or use WEBSITE_SWAP_WARMUP_PING_PATH, such as /health, and WEBSITE_SWAP_WARMUP_PING_STATUSES, such as 200,202. Requiring expected statuses prevents a failed readiness response from being accepted as a successful warm-up. Auto swap performs a warmed swap after deployment, but is unsupported for Linux web apps and Web App for Containers.
Limit exposure and preserve rollback
Traffic routing can send 10% of production traffic to staging before a full swap. The x-ms-routing-name cookie keeps a routed client on its assigned slot. A tester can request staging with ?x-ms-routing-name=staging.
If the completed swap raises errors, swapping the same slots again restores the old code. That does not reverse a database migration. Both versions must understand the database during release and rollback: add compatible columns first and remove obsolete ones after the old code is gone.
Slots share plan instances, so a staging load test can slow production. Use separate capacity for tests requiring isolation. A plan with more than 5 slots cannot move down to Standard without reducing the slot count.
Recognize equivalent release choices
Elastic Beanstalk offers all-at-once deployment with downtime, rolling batches with reduced capacity, rolling with an additional batch to preserve capacity, immutable deployment on new temporary-group instances, and traffic splitting for a canary. Blue/green deployment swaps environment URLs. Cloud Run, App Engine and Container Apps divide traffic among revisions or versions by weight.
Key Takeaways
- A swap prepares and warms source instances before production routing changes.
- Keep environment-specific settings attached to their slots.
- Preview and traffic routing expose different stages of release validation.
- A code rollback needs a database schema that both versions can use.
- Staging and production slots share plan resources.
- Match release policy to the required serving capacity and rollback method.
6Test and tune performance under load
A performance test is useful when its workload, measurements and pass criteria answer a clear question. Expected peak, sudden bursts and long steady runs reveal different limits. Build a realistic test, then read client response times beside server resource use to find where requests begin waiting. Verify the whole scaling cycle, including readiness and scale-in, and compare controlled changes using the same workload.
6.1 Plan performance tests with clear targets
Performance testing measures latency, throughput, errors and resource use under a defined workload. Write the pass criteria first: “At 2,000 requests per second, p95 latency stays below 300 ms and errors below 0.5% for 30 minutes.” A run then has a clear success condition.
Choose the load shape
| Test | Load pattern | What it reveals |
|---|---|---|
| Load | Sustained expected peak | Whether the service meets its target |
| Stress | Increasing beyond expected peak | Breaking point and failure behavior |
| Spike | Sudden jump | Whether capacity becomes ready fast enough |
| Soak | Normal load for hours | Slow memory or resource growth |
| Scalability | Stepped load with growing capacity | Whether throughput grows with resources |
Read the tail of response times
A percentile reports a position in sorted measurements. With nearest-rank p95, at least 95% of values are at or below that position. Consider these 20 times in milliseconds:
95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 108, 110, 112, 115, 120, 125, 130, 610, 940.
The mean is 173.5 ms and the median is 104.5 ms. Nearest-rank p90 is the 18th value, 130 ms; p95 is the 19th, 610 ms. The median describes a typical request but hides the two very slow ones. Use percentiles and error rates together: fast rejected requests should not make a failing test look healthy.
Model users and requests separately
Mix operations in realistic proportions, such as 70% browsing, 25% search and 5% checkout. Use varied data, realistic cache conditions and time between user actions. A test repeatedly reading one cached record measures a different workload from users searching a large data set.
Little’s law relates average requests in progress, throughput and time in the system:
Here, is average concurrent work, is completed requests per second, and is average response time in seconds. At 200 requests per second and 0.25 seconds each, 50 requests are in progress. With 4.75 seconds of think time per user, a full user cycle is 5 seconds, so 1,000 virtual users produce about 200 requests per second. Virtual users include time spent thinking; concurrent requests do not.
Make the environment credible
Match production instance types, scaling settings, data volume and network path. Generate traffic from locations representing users. Watch the generators’ CPU and network so they can actually supply the intended load. Obtain permission before testing a service owned by someone else.
JMeter, Locust, k6 and Gatling generate load. Azure Load Testing runs quick URL tests or JMeter/Locust scripts, correlates server metrics, applies fail criteria and can run in CI/CD. Distributed Load Testing on AWS is another managed approach. Keep tests running long enough to include scaling reactions and record both warm-cache and colder-cache behavior when users experience both.
Key Takeaways
- Choose the test shape from the question you need answered.
- Set throughput, latency, error and duration thresholds before running the test.
- Tail percentiles reveal slow requests that averages can hide.
- Distinguish virtual users from simultaneous requests when think time is present.
- Validate the test environment and the load generators.
6.2 Find bottlenecks and tune scaling from test results
Start at low load to establish a baseline, then increase in controlled steps. Align client latency, throughput and errors with server CPU, memory, queue length, database connections and throttling on the same time axis. The timing helps identify which saturated resource preceded the slow responses.
Find where throughput stops keeping up
| Offered requests/s | Delivered requests/s | p95 latency |
|---|---|---|
| 500 | 500 | 120 ms |
| 1,000 | 1,000 | 140 ms |
| 1,500 | 1,400 | 450 ms |
| 2,000 | 1,420 | 2,300 ms |
The knee occurs as delivered throughput levels near 1,400 requests per second and latency starts rising sharply. Extra arrivals are waiting or failing. Check which resource reached its limit at that point; the curve locates the capacity region but does not identify the resource by itself.
High app CPU can justify more instances or a compute optimized family. Low CPU with high latency suggests waiting on a database, external API, connection pool or lock. HTTP 429 points toward a quota, concurrency limit or throttling rule. Errors concentrated on newly launched instances suggest readiness or health-check timing.
Memory growing during a soak test needs investigation. Retained objects can indicate a leak, but expanding caches or pending work can also explain growth. Observe whether the level stabilizes and inspect what is retained before deciding on a fix.
Measure scaling against the latency budget
Suppose traffic jumps from 300 to 3,000 requests per second. Each instance serves 250, and only 2 are running. Required capacity is:
Until new capacity is ready, existing instances serve only 500 requests per second. If startup takes 4 minutes, the missing capacity persists through that interval. Raising the maximum alone will not solve that timing gap. A higher minimum, capacity scheduled ahead or shorter startup can protect the response target.
Measure when load rose, when the policy reacted, when instances launched and when they first served successfully. Check the group maximum, vCPU quotas and type availability. A cap can explain a plateau even when the application would scale further.
Test the return to normal
After demand falls, observe scale-in. Requests in progress should finish, workers should complete or release messages, and counts should settle without repeated reversals. Include the full decrease in the test; ending at peak misses termination problems.
Change one thing and repeat the same workload. Candidate changes include a better-matched instance family, pooled connections, caching, queued background work, more function memory or a different container concurrency target. Compare p95, errors and resource use together so one apparent improvement does not conceal another regression.
Keep test results to detect gradual drift. A short CI/CD load test with fail criteria can block a release that worsens latency or error rate before it reaches production. It complements longer spike and soak tests that expose behavior a short release check cannot exercise.
Key Takeaways
- Locate the capacity knee, then use server metrics to identify the limiting resource.
- Low app CPU with high latency calls for dependency and waiting-time investigation.
- Measure time to useful capacity, including the startup gap.
- Verify safe, stable scale-in after demand falls.
- Change one variable per comparison and keep the workload consistent.
- Store results and enforce useful performance thresholds in delivery checks.
Auto Scaling examples
1Choose a machine from workload evidence
12 steps
- 1IntroductionStart with the workload’s limiting resource
A machine type is a bundle of CPU, memory, network and sometimes disks or accelerators. The name helps you find candidates, but the application’s measurements determine the fit.
Follow a reporting service from resource observations to a type choice. First identify the family, then calculate headroom and check whether its growth should come from a bigger machine or more copies.
- 2ExplanationCompare resource balances
General purpose types balance CPU and memory. Compute optimized types offer more CPU relative to memory; memory optimized types offer more memory per vCPU.
A large cache can run short of memory while CPU stays mostly idle. A memory family adds the resource it needs without forcing the same CPU increase as a larger balanced type. Storage and accelerated families serve other measured bottlenecks.
- 3ExampleRead an AWS name by position
In
c7gn.xlarge, read the name in parts:c: compute optimized series.7: generation.g: Graviton Arm processor.n: network optimized option.xlarge: size within the family.
Position changes meaning: the first letter in
g5.xlargeidentifies the graphics series. A laterginm7g.xlargeidentifies the processor. - 4ConnectionRead Azure and Google names
Azure
Standard_D4ds_v5identifies a D-family VM with 4 vCPUs, a local temporary disk, Premium SSD support and version 5.Google Cloud
n2-highmem-8identifies the N2 series, highmem type and 8 vCPUs. Highmem in N2 supplies 8 GB per vCPU, giving 64 GB. The same CPU count can therefore sit beside quite different memory amounts when the type or family changes. - 5ChallengeCheck an architecture dependency
An application is ready for Arm, but its required monitoring agent exists only as an x86 binary. Can the whole deployment move to Graviton unchanged?
---reveal---
No. The required agent must run on the chosen architecture too. Use an Arm-compatible agent or keep an x86 type. A container image packages binaries; it does not convert their instruction set.
- 6ExplanationMeasure peaks before choosing size
The reporting service peaks at 1.8 vCPUs of work and 10 GiB of memory. Its disk and network use remain below the measured type limits. The plan adds 25% to both peaks.
Checking the busiest representative periods matters here: an average across quiet nights could hide the memory peak. Guest memory measurements require an agent because the hypervisor cannot see application memory use.
- 7ExampleCalculate both requirements
Add the same planned headroom to each measured resource:
The service needs 2.25 vCPUs of capacity.
It also needs 12.5 GiB of memory. A 2-vCPU machine fails the CPU requirement even if it has enough memory. The chosen type must pass both checks.
- 8ExampleSelect the fitting candidate
Compare three available candidates: 2 vCPUs/16 GiB, 4 vCPUs/8 GiB and 4 vCPUs/16 GiB.
The first lacks CPU for 2.25 vCPUs of required work. The second lacks memory for 12.5 GiB. The third meets both requirements. Next check processor compatibility and the exact sustained network and disk limits before testing it with the real workload.
- 9ExplanationChoose how copies share work
If demand grows, scaling up moves to a larger type and usually involves a restart. Scaling out adds copies, but those copies need a way to share the job.
Web servers can share requests through a load balancer; workers can share a queue. Durable sessions and files must survive one copy being removed. A one-node stateful application may instead need a larger instance or a redesigned replication scheme.
- 10ChallengeCheck a burstable candidate
A burstable type’s average CPU exceeds its baseline throughout most of the workday. What should you investigate before choosing it for the reporting service?
---reveal---
Calculate credit earnings and spending over that demand pattern. Sustained excess use can drain the balance: standard mode then restricts CPU, while unlimited mode can create surplus charges. Compare fixed-performance capacity for this sustained workload.
- 11ChallengeCombine sizing with compatibility
A new cache needs 2 vCPUs and 15 GiB after headroom. Both 2/16 and 4/16 types meet those needs, but the 2/16 option is Arm-only and a required binary is x86-only. What can you select now?
---reveal---
Select a compatible x86 option that meets both requirements, such as the stated 4/16 candidate if it supports x86. The resource fit alone cannot make the Arm-only option usable. Revisit the smaller option when the dependency becomes compatible.
- 12RecapRecord a reviewable type choice
For the chosen deployment, record the measured peaks, added headroom, compatible architecture and exact type limits. Keep the test result beside that decision so later changes can be compared against it.
Before switching the running service, choose a maintenance resize or rolling replacement. If growth uses multiple copies, verify traffic distribution and external state before relying on their combined capacity.
2Keep enough capacity after a failure
11 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionChoose the failure to survive
- 2ExplanationSeparate fault and update domains
- 3ExampleCount the largest hardware loss
- 4ChallengeChoose distance or speed
- 5ExplanationMove the failure boundary to zones
- 6ExampleFind normal serving capacity
- 7ExampleCalculate the surviving pool
- 8TipCheck physical location labels
- 9ChallengeDistinguish spread from recovery
- 10ChallengeCombine the failure and capacity choices
- 11RecapVerify the full surviving service
3Build and tune a worker scaling group
16 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionMake scaling useful end to end
- 2ExplanationPut setup into a repeatable template
- 3ExplanationGive counts their correct roles
- 4ChallengeTest a broken application
- 5ExplanationChoose a signal that changes with capacity
- 6ExampleEstimate a proportional capacity change
- 7ConnectionUse known timing before the peak
- 8ChallengeCheck a proposed scale-in
- 9ExampleTurn a wait budget into worker count
- 10ExampleApply the backlog target
- 11ExplanationDistinguish the timing controls
- 12TipPrepare for removal while work is active
- 13ChallengeFind a blocked launch
- 14ExplanationRoll configuration through the group
- 15ChallengeCombine quantity, readiness and safe removal
- 16RecapObserve one full scaling cycle
4Design a queued report service
16 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionSeparate acceptance from completion
- 2ExplanationChoose the container’s running unit
- 3TipPin exactly what replicas run
- 4ExampleCalculate a queue-driven replica count
- 5ChallengeCheck what scales underneath tasks
- 6ExampleEstimate overlapping function work
- 7ExampleBenchmark memory and duration together
- 8ExplanationUse the right concurrency control
- 9ChallengeRespect the HTTP wait
- 10ExplanationLet the API hand off the job
- 11ExampleAccount for continued arrivals
- 12Key InsightProtect one business effect
- 13ExplanationAllow time before redelivery
- 14ChallengeExplain a duplicate job
- 15ChallengeCombine a fast response with a protected database
- 16RecapCheck the queued service under failure
5Release a web app with a safe return path
13 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionPrepare code, capacity and configuration
- 2ExplanationLocate the shared compute pool
- 3ExampleChoose features before scaling
- 4TipKeep stateless copies ready
- 5ChallengeIsolate an intensive staging test
- 6ExplanationKeep environment settings attached
- 7ExampleFollow preparation before routing
- 8TipMake readiness meaningful
- 9ChallengePrevent a configuration swap error
- 10ExplanationTry a small share of live traffic
- 11Key InsightKeep old code compatible with the data
- 12ChallengeCombine capacity and rollback checks
- 13RecapDecide from the release evidence
6Use a load test to choose the next change
12 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionDefine what the run must establish
- 2ExplanationChoose the appropriate load shape
- 3ExampleRead more than the average
- 4ExampleEstimate the virtual-user load
- 5ChallengeCheck a misleading test workload
- 6ExampleFind the flattening throughput
- 7ExplanationUse resource evidence to select a hypothesis
- 8ChallengeCheck whether more app CPU helps
- 9ExampleMeasure readiness separately from maximum
- 10TipInclude the falling side of load
- 11ChallengeCombine criteria with a controlled comparison
- 12RecapChoose one measured next step
Auto Scaling practice questions
Set 1: Choose capacity and recognize scaling behavior10 Practice Questions
Question 1 of 10
Show answerHide answer
Question 2 of 10
Show answerHide answer
Question 3 of 10
Show answerHide answer
Question 4 of 10
Show answerHide answer
Question 5 of 10
Show answerHide answer
Question 6 of 10
Show answerHide answer
Question 7 of 10
Show answerHide answer
Question 8 of 10
Show answerHide answer
Question 9 of 10
Show answerHide answer
Question 10 of 10
Show answerHide answer
Set 2: Apply policies and release changes safely10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 3: Connect capacity, retries and observed performance10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Standard_E8s_v5, what does the number 8 identify?Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
us-east-1b and need their instances in the same physical zone. What identifier should they compare?Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 4: Diagnose limits across a running architecture10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 5: Make combined design decisions under changing load10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Stuck on your own question? Homework Help
Key Terms
A
Always On
App Service plan
Arm
ARR affinity
Asynchronous request-reply
Auto Scaling group
Autoscale profile
Availability set
Availability zone
AZ ID
B
Backlog per instance
Backward-compatible schema
Binding constraint
Blue/green release
C
Canary release
Capacity knee
Checkpoint
Cluster placement group
Cold start
Compute optimized family
Concurrency
Connection draining
Container group
Container registry
Cooldown
CPU credit
Custom machine type
D
Dead-letter queue
Decoupling
Deployment slot
F
Fault domain
Flapping
G
GB-second
General purpose family
H
Headroom
Health check grace period
Horizontal scaling
I
Idempotency
Image digest
Instance refresh
Instance type
Instance warmup
L
Launch template
Lifecycle hook
Little’s law
Load test
M
Managed instance group
Memory optimized family
P
Partition placement group
Pass criterion
Per-app scaling
Percentile
Performance regression
Predictive scaling
Private endpoint
Provisioned concurrency
Publish/subscribe
Q
Queue-based load leveling
R
Replica
Reserved concurrency
Revision
Right-sizing
S
Scale to zero
Scale-in protection
Scheduled scaling
Service level agreement
Slot setting
Soak test
Spike test
Spot capacity
Spread placement group
Stateless function
Static stability
Step scaling
Swap with preview
T
Target tracking
Task definition
Think time
Throttling
Throughput
U
Update domain
V
vCPU
Vertical scaling
Virtual Machine Scale Set
Virtual network integration
Visibility timeout
W
Warm pool
Warm-up
Z
Zonal resource
Zone-redundant resource
About this lesson
Make your own Study Materials
Turn your notes, slides and documents into Study Guides, Practice Questions, Flashcards and 6 more tools.