1.The Scaling Toolbox
There are about ten ways to make a system handle more load, and they are not interchangeable. Some add capacity (scale out, scale up, autoscale). Some remove work (cache, CDN, batch). Some move work off the critical path (async processing, queues). Some remove contention (pooling, partitioning, workload isolation). The measurement tells you which category you need.
Key features
- AWS defines performance efficiency as using computing resources efficiently to meet system requirements, and maintaining that efficiency as demand changes and technologies evolve
- Horizontal scaling adds instances and needs statelessness; vertical scaling changes instance size and usually needs a restart, so it does not help availability
- Caching and CDN remove work rather than adding capacity, which is why they are usually the cheapest large win — and why a low hit rate makes them worthless
- Async processing and batching move work off the request path; the user-visible latency drops even though total work does not
- Connection pooling addresses contention, not throughput — a database with a bounded connection count is a shared resource that pooling rations
- Read replicas scale reads only and add replication lag, partitioning scales writes but changes the data model, and workload isolation stops a batch job degrading interactive traffic
Which lever for which bottleneck
- Add capacity
- Scale out — more instances; needs statelessness
- Scale up — bigger instance; usually a restart
- Autoscale — track a signal users feel
- Remove work
- Cache — worthless at a low hit rate
- CDN — serve static bytes at the edge
- Batch — amortize per-call overhead
- Remove contention
- Connection pooling — ration a bounded resource
- Partitioning — scales writes, changes the model
- Workload isolation — batch must not degrade interactive
Signature
add capacity (out/up/auto) · remove work (cache, CDN, batch, async) · remove contention (pool, partition, isolate)
Three categories: add capacity (scale out/up, autoscale), remove work (cache, CDN, batch), remove contention (pooling, partitioning, isolation). Measure which one you have before choosing — scaling out a contention bottleneck makes it worse, not better.