Scalability
Scalability is how well a system copes when its load grows.
Scalability is a question
"Our database is scalable" says nothing on its own. Ask: if we grow in this specific way, what are our options, and when do we hit the limit? A new product with few users should stay simple and easy to change. Building for imagined scale wastes work and can lock you into a stiff design.
Describing load
Measure today's load before asking "what if it doubles?". Load is often a throughput number, like orders per hour, or a peak, like users online at once. Its shape matters too: read/write ratio, cache hit rate, items per user. Sometimes a few extreme users, not the average, decide where it breaks.
Linear scaling and cost
Keep hardware fixed and see how performance changes. Or keep performance fixed and see how much hardware you must add. If twice the hardware handles twice the load, that is linear scaling, which is good. Often cost grows faster, because more stored data makes each request do more work.
Scale up or scale out
Scaling up means one bigger machine whose threads share memory. At the high end, twice the machine costs far more than double and rarely takes twice the load. Shared-disk means several machines sharing one disk array, but locking limits it. Shared-nothing (scaling out) gives each node its own CPU, memory, and disk. It can scale close to linearly, use the best-value hardware, resize easily, and span datacenters. But it needs sharding and is harder to run. Some cloud databases share one storage service built for the database, which avoids those limits.
Principles for scaling
No single design fits every app. A design usually breaks at ten times its load, so plan about one 10x step ahead. Split the system into parts that run on their own. Do not add complexity you do not need.
Remember
- Ask "scale for what growth?", not "is it scalable?".
- Measure current load and its shape.
- Linear is good; cost often grows faster.
- Scaling out needs sharding and brings distributed problems.
- Rethink at each 10x, and keep it simple.