Scalability
😟 THE PROBLEM
Sale traffic triples and the website slows to a crawl.
😊 THE SOLUTION
Scale: make servers bigger (up) or add more of them (out).
- One server is too slow✓ Scale up: more CPU and memory
- Too many users for one server✓ Scale out: add more servers
- Extra servers after the sale✓ Scale back down and stop paying
Quick answer
Scalability is the ability to adjust resources to meet demand. If demand grows, you add resources; if it falls, you remove them. There are two directions. Vertical scaling (scale up or down) makes a resource bigger or smaller, for example more CPU and RAM. Horizontal scaling (scale out or in) adds or removes instances. In the cloud you pay only for the resources you are using at the time.
Exam objective: 1.2.1 Describe the benefits of high availability and scalability in the cloud. (Skills measured as of July 20, 2026)
Start with a question
A restaurant suddenly gets a queue out of the door. Does it buy a bigger kitchen, or open more counters?
Both are ways of handling more customers. A bigger stove and a faster chef is scaling up. Opening three more counters with more staff is scaling out. When the rush is over, a smart restaurant sends the extra staff home so it is not paying for them.
That is scalability: matching capacity to demand, in both directions.
Explain it like I’m 10
The technical explanation
Scalability is the ability of a system to handle more (or less) work by adjusting resources. Because cloud resources are on demand and billed by consumption, you can scale to the load you have now and pay only for that.
Vertical scaling
Scale up / scale down
- Change the size of one resource
- Example: VM from 2 to 8 vCPUs
- Simple; no app changes
- Has a ceiling (largest size)
- Often needs a restart
Horizontal scaling
Scale out / scale in
- Change the number of instances
- Example: 2 to 10 web servers
- Near-unlimited ceiling
- Adds redundancy too
- App should be stateless
How you scale in Azure
| Service | Scale up | Scale out |
|---|---|---|
| Virtual Machines | Resize the VM | Virtual Machine Scale Sets |
| App Service | Change the App Service plan tier | Increase instance count (manual or autoscale) |
| Azure SQL Database | More vCores or higher tier | Read replicas, Hyperscale, elastic pools |
| Azure Functions | Larger instance memory (Flex) | Automatic, event-driven |
| AKS | Bigger node sizes | More pods and nodes (cluster autoscaler) |
Bought once for an "average busy day". Idle at night, overwhelmed at the 3 pm exam rush.
37%capacity idle
5%demand unmet
An engineer adds or removes servers on a schedule. Better, but the rush arrived an hour before anyone reacted.
30%capacity idle
1%demand unmet
Architect level Scaling the whole system, not one tier
Scaling one tier often just moves the bottleneck. Senior engineers look at the full path:
- Edge: CDN and Front Door absorb static content and spread load globally.
- Web/API: stateless instances behind a load balancer, with autoscale.
- Async work: queues (Service Bus, Storage Queues) decouple spikes from slower back ends. This is queue-based load levelling.
- Data: caching (Redis), read replicas, partitioning. Choose a data store whose scaling model fits the access pattern.
- Limits: every service has quotas (vCPU per region, connections per database). Request increases before a big event, not during it.
Load-test before the big day. Real behaviour under load rarely matches the diagram.
Real-world business scenario
An online shopping platform
- The problem
- Annual sale traffic is ten times normal for 72 hours. Previously the site ran on fixed servers sized for normal days and slowed to a crawl.
- What they used
- App Service with scheduled scale-out before the sale and autoscale rules on CPU, Azure SQL Database scaled up for the sale, Redis cache for product pages.
- Why that choice
- Horizontal scaling for the stateless web tier, vertical scaling for the database, and scaling back afterwards to stop paying for the extra capacity.
- The result
- Checkout stayed fast through the sale, and the extra capacity cost only three days of usage.
When to use it and when not to
✓ Use it when…
- **Scale out** for stateless web and API tiers, and any workload you can split across instances.
- **Scale up** for workloads that are hard to distribute, such as some databases or legacy apps.
- **Scale down/in** after peaks to save money.
✕ Think twice when…
- Scaling out a stateful app that keeps sessions in memory. Users will lose sessions. Fix the design first.
- Scaling up as the only strategy for growth. You will hit the largest size eventually.
↔ Alternatives to consider
- **Caching** and **CDNs** to reduce load before adding capacity.
- **Serverless** services that scale automatically without any configuration.
Interview preparation
Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.
Beginner What is scalability, and what are the two types?
Model answer
Scalability is being able to add or remove resources as demand changes. Vertical scaling makes one machine bigger or smaller, for example more CPU or memory. Horizontal scaling adds or removes machines, for example going from two web servers to six.
Interviewer follows up
Which one is better?
You
Horizontal scaling is usually preferred in the cloud because there is no upper limit set by the biggest machine, it adds redundancy, and it can happen without downtime. Vertical scaling is simple and useful for things like databases that are hard to split, but it has a ceiling and often needs a restart.
Intermediate What is the difference between scalability and elasticity?
Model answer
Scalability is the ability to grow or shrink resources to handle load, which can be done manually or on a schedule. Elasticity is scalability that happens automatically and rapidly in response to real-time demand, for example autoscale adding instances when CPU goes above 70%.
Experienced developer You need to scale out a web application. What design changes might be needed first?
Model answer
Make the tier stateless. Move session state to a distributed cache like Redis, store uploads in Blob Storage instead of local disk, externalise configuration, and make background jobs idempotent so they can run on any instance. Then check downstream bottlenecks. Scaling the web tier often just moves the bottleneck to the database, so consider read replicas, caching, partitioning or queue-based load levelling.
Interviewer follows up
How do you scale a relational database?
You
First vertically (more vCores), then with read replicas for read-heavy loads, caching, and finally partitioning or sharding, or a horizontally scalable service such as Azure SQL Hyperscale or Azure Cosmos DB, depending on the data model.
Scenario An e-commerce site expects traffic to triple during a three-day sale. What would you do?
Model answer
Scale out the web and API tiers ahead of the sale (scheduled autoscale), with autoscale rules on top to handle surprises; scale up the database tier for the sale; warm the cache; and scale back in afterwards so they stop paying for the extra capacity.
Test yourself with exercises
4 original practice questions in the AZ-900 style. Pick your answers, then check them. You will see why each option is right or wrong. Score 75% or more and this topic is marked complete.
Quick revision
Key points
- Scalability = adjust resources to meet demand, up or down.
- Vertical = scale up/down: bigger or smaller resource (CPU, RAM).
- Horizontal = scale out/in: more or fewer instances.
- In the cloud you pay only for resources currently in use, so scaling down saves money.
- Horizontal scaling needs stateless app design and also adds redundancy.
Important terminology
- Scalability
- The ability to increase or decrease resources to handle changes in workload.
- Vertical scaling (scale up/down)
- Changing the size of a single resource, such as adding CPUs or memory to a VM.
- Horizontal scaling (scale out/in)
- Changing the number of instances, such as going from 2 web servers to 10.
- Stateless
- An app instance that keeps no user-specific data locally, so any instance can handle any request. This is essential for scaling out.
Common mistakes
- Mixing up the words. Up/down = vertical, out/in = horizontal.
- Confusing scalability (capacity) with availability (uptime).
Exam tips
- "Add more virtual machines" = scale out (horizontal).
- "Increase the VM size / add CPU and memory" = scale up (vertical).
Five quick revision questions
-
1.Adding more RAM to a VM is which type of scaling?Show
Vertical scaling (scale up).
-
2.Going from 3 to 8 web server instances is which type?Show
Horizontal scaling (scale out).
-
3.Why is horizontal scaling popular in the cloud?Show
No single-machine size limit, it adds redundancy, and it usually needs no downtime.
-
4.What app design property makes scaling out easy?Show
Being stateless.
-
5.Do you keep paying for capacity after scaling down?Show
No. You pay for what is in use.
Official references
Finished this lesson? Tick it off. Your progress is saved in this browser.
Next up: Elasticity