Scale up, scale out and the three axes of scaling
Compare a bigger machine with more machines, learn the three axes of the scale cube (clone, split by function, split by data), and match each one to the bottleneck it actually relieves.
Contentsand lesson path
On this page
- Why it matters
- Scale up: a bigger machine
- Scale out: more machines, and what they cost
- The scale cube: three ways to split the work
- Match the axis to the bottleneck
- Check your understanding
- Apply it
- Review prompt
Lessons of Scalability Fundamentals
- Scale up, scale out and the three axes of scaling Concept · 20 min
- Sizing a tier: per-instance capacity, headroom and Little's law Worked example · 20 min
- Externalizing state and scaling a service to four instances Lab · 30 min
- Autoscaling signals, limits and warm-up Concept · 15 min
- Why scaling flattens: contention, coherency and the tail Concept · 20 min
- Scalability check Knowledge check · 8 questions
What you will learn
- Compare vertical and horizontal scaling and the scale-cube axes (cloning, functional split, data partitioning) for a given bottleneck.
01. Why it matters
A system is scalable when it can take more load and keep its latency, error rate and cost per request within target, just by adding resources and without a redesign. That is not the same as being fast. A performance problem shows up even with one user: a page takes two seconds because one query is slow. A scalability problem shows up only under load: the same page is quick at 10 requests per second and slow at 2,000. The System Design Primer draws the same line. It is a good first question in any investigation, because the two problems have different fixes.
When load grows you have two broad moves. You can scale up (vertical scaling): run the same software on a bigger machine. Or you can scale out (horizontal scaling): run more machines and split the work between them. Real systems use both, often at different tiers and at different times. This lesson compares the two moves, then introduces the scale cube, a model that names three different ways to split work. Knowing which split matches which bottleneck stops you from buying machines that do not help.
02. Scale up: a bigger machine
Scaling up means more CPU cores, more memory, faster disks or a faster network card for one machine. Its great strength is that the software does not change. There is no new network hop, no question of which machine holds which data, and a transaction that touches many rows stays on one node, where the database can keep it consistent cheaply. For a relational database, that often makes scaling up the right first move.
It has three limits:
- A ceiling. There is a largest machine you can buy or rent. Each hardware generation raises it, but you tend to meet it at a bad moment, when you are already busy.
- Price and fit. Towards the top of a product range, the price per unit of capacity often rises, and some software cannot use the extra hardware. A process that sends all its work through one lock or one thread uses about one core, whether the machine has 4 cores or 96.
- One failure domain. One machine is one thing that can fail, be patched or be rebooted. Resizing usually needs a restart, so growth itself can cause downtime unless a standby takes over.
So scaling up buys simplicity and easy consistency, and pays with a ceiling, a single point of failure and growth in large, infrequent steps.
03. Scale out: more machines, and what they cost
Scaling out means adding machines, containers or processes that share the work. Done well, it gives you three things a bigger box cannot: capacity in small steps, redundancy (losing one of ten instances costs a tenth of your capacity, not all of it), and the ability to follow demand by adding instances in the evening and removing them at night.
It is neither free nor unlimited. The work must be divisible, so that any request can land on any instance. That means instances cannot keep important state in their own memory; the lab in this skill shows exactly what breaks when they do. You also need a load balancer, more network hops and more things to deploy and monitor, and you get new failure modes.
Most importantly, scaling out a tier helps only if that tier is the bottleneck. Ten more web servers in front of one saturated database make the queue at the database longer, not shorter. Even when the work divides cleanly, shared things such as a database primary, a lock, a single hot cache key or a cloud quota limit how much each extra node adds, and coordination between nodes can make the gain shrink and then turn negative (lesson 05 models this). Treat "horizontal scaling is unlimited" as a myth. How far it goes depends on the workload, where the state lives, how the data is partitioned, how much the nodes contend and coordinate, your provider's quotas and your budget.
04. The scale cube: three ways to split the work
The scale cube was introduced by the consultancy AKF Partners and described in the book The Art of Scalability. It names three independent ways to split work.
X axis: clone Y axis: split by function Z axis: split by data
[shop] [shop] [shop] [search] [checkout] [mail] [shop A-H] [shop I-Q]
any copy serves any each part scales and same code, each copy
request deploys on its own owns one key range- X axis: clone. Run identical copies of a component behind a load balancer; any copy can serve any request. This is what most people mean by scaling out, and it is cheapest when the component is stateless, meaning it keeps no data that later requests depend on. For data stores, the X-axis version is a read replica or a cache: copies of the same data that serve reads. Cloning does nothing for the write load on a single primary, or for a data set too big for one node, because every clone needs all of it.
- Y axis: split by function. Move different kinds of work into separate components, so that search, checkout and email each get their own service, resources and release cycle. For databases this is called functional partitioning or federation: accounts, the product catalogue and orders move to separate databases. The Y axis helps when one kind of work starves another, or when parts of the system need very different resources. The costs are network calls where function calls used to be, and joins or transactions that span the split become application code or distributed transactions: possible, but slower and much harder to get right.
- Z axis: split by data. Run the same code everywhere, but give each node a subset of the data, chosen by a key such as customer ID or region. This is data partitioning, called sharding when it applies to databases. It is the axis that adds write and storage capacity for a single data set. The costs are a routing layer, queries that cross partitions becoming expensive, and the work of moving data when partitions are added or when one key gets much busier than the others.
05. Match the axis to the bottleneck
The axes are tools; the bottleneck decides which one you pick. Imagine a food delivery app with three separate problems:
- The API tier runs at 85% CPU every evening, and every request is independent. That is an X-axis problem: add identical stateless instances, after checking that they really are stateless.
- Restaurant search runs heavy ranking queries on the same servers and the same database as checkout, and on busy nights checkout slows down whenever search does. That is a Y-axis problem: give search its own service and its own read-optimised store, so that its load cannot starve checkout.
- Couriers send their location every few seconds, and the location table now receives more writes than one database node can absorb. Neither cloning nor a functional split adds write capacity to a single primary. Partitioning the location data by courier ID (Z axis) does, because each partition takes only its share of the writes.
Two more cases are worth remembering. First, some bottlenecks sit on none of the axes. If every request updates the same row, such as the remaining stock of one very popular product, extra clones and extra partitions all queue on that row. You need a design change instead, for example splitting the counter into several sub-counters or reserving stock in batches. Second, combining axes is normal. A large system might clone its API tier, split search into its own service and partition its order database by customer, while still running each database partition on a large machine.
A practical order of moves: measure first to find the saturated resource; scale up a stateful component while bigger machines are still affordable; clone stateless tiers; split by function when workloads interfere; and usually partition data last, because it is the hardest change to undo.
06. Check your understanding
07. Apply it
The practice task for this skill asks you to run a service that keeps sessions in memory, move its state to a shared store, scale it from one to four instances and then estimate where adding instances stops helping. Prepare for it with a short bottleneck note about a system you know, or about the cart service you will build in the lab of this skill.
- List each tier: client, load balancer, application, cache, database, queue.
- For each tier, write the resource you expect to saturate first (CPU, memory, connections, disk, one hot key) and how you would confirm it with a measurement.
- Write the move you would make (scale up, or an axis of the cube) and one sentence on what it costs.
Keep the note. In lesson 05 you will compare it with what a scalability model says about the same tier.
08. Review prompt
Without looking back, explain in a few sentences: how a performance problem differs from a scalability problem; two limits of scaling up and two costs of scaling out; what the X, Y and Z axes of the scale cube split, with one bottleneck each axis relieves; and an example of a bottleneck that none of the axes fixes on its own.
References
Your progress
Reading state
Sign in to save that you finished reading this lesson.
Prove this skill
8 questions · about 6 minutes · scored automatically. Marking a lesson as read never demonstrates a skill.