Scalability
A lemonade stand works fine for twenty customers. What happens when two thousand show up?
Swipe or tap Next for the next section
The Lemonade Stand
You set up a table, a jug, and a stack of cups. On a normal afternoon you sell about twenty cups — easy. Then a video of your lemonade goes viral, and the next day there's a line down the street.
Suddenly everything that worked before starts to go wrong. Your arms get tired. The jug is always empty. People give up and leave.
A system is scalable if it can keep working well as it grows — much more work, many more users — without falling apart or having to be rebuilt from scratch.
Two Ways to Grow
Scale up: get bigger
Buy a giant jug and an electric juicer. One stand, but more powerful.
Simple — but there's a limit. There's only so big a jug can get.
Scale out: add more
Open more stands around town, each with its own helper.
Can keep growing — but only if the stands work together well.
Computers grow in the same two ways. A website can move to one bigger, faster computer (scaling up), or it can spread its work across many ordinary computers working side by side (scaling out). The biggest websites in the world scale out — they run on thousands of computers at once.
What Has to Change
Turning one stand into a chain means solving problems you never had before:
| What breaks | What has to change |
|---|---|
| You can only squeeze lemons so fast | Hire helpers and open more stands |
| Every stand makes the lemonade a bit differently | Write the recipe down so every stand follows the same rules |
| Customers line up at one stand while another sits empty | Send each customer to whichever stand has the shortest line |
| You run out of lemons by noon | Find a supplier who delivers to every stand |
| If you get sick, the whole business stops | Make sure no single person is the only one who can do a job |
Every one of those has a computer version. Websites share the load across many computers, send each visitor to the least-busy one, follow shared rules so every computer gives the same answer, and keep spare copies so one breakdown doesn't take everything offline (more on that in Redundancy & Fault Tolerance).
When Scaling Goes Wrong
You've probably seen a system that didn't scale: a ticket website that crashes the moment a big concert goes on sale, or a game's servers that fall over on launch day. Nothing was broken before — the system just wasn't built for that many people arriving at once.
Sometimes the limit is built right into the design. The original internet addresses had room for about 4.3 billion devices, which felt endless in 1981 — until the world ran out. That story is on the IPv4 vs IPv6 page.
The Internet Was Built to Scale
The internet itself is one of the most scalable systems ever built. It has grown from a handful of university computers to billions of devices, and it still works. A few design choices made that possible:
- No single boss computer. There's no central machine everything has to go through, so there's no single bottleneck to overload.
- Shared, open rules. Anyone can connect a new network, as long as it follows the same agreed rules (called protocols) as everyone else.
- Many possible routes. Data can travel lots of different paths, so new connections add capacity instead of crowding one road — see Packets & Routing.
5 quick questions. Pick one answer for each — you'll see why straight away.
A website works well for 1,000 visitors a day but crashes when a million visit at once. The website is not…
Scalability is a system's ability to keep working as demand grows. This site couldn't handle the growth.
Which of these is an example of "scaling out"?
Scaling out means adding more machines. Replacing one machine with a more powerful one is scaling up — and it has a ceiling.
Why was the internet able to grow from a few computers to billions of devices?
Shared protocols let anyone join, and having no single central point means no single bottleneck to overload.
A club's sign-up forms are all typed in by one volunteer. Membership triples. What is the scalability problem?
When a single person, machine, or step has to handle everything, growth piles up there. Scaling means removing that bottleneck.
The original internet addressing system (IPv4) eventually ran out of addresses. Why?
A fixed number of bits means a fixed number of possible values. 32 bits felt like plenty in 1981 — then billions of devices came online.