Scale Up and Scale Out
Scaling increases the workload a system can handle. First identify what is limiting it: CPU, memory, storage I/O, connection count, or a query doing unnecessary work.
•
Scale up: give one server more resources. This can be simpler, but hardware limits, price, and maintenance remain concerns.
•
Scale out: distribute work across servers. More capacity comes with routing, coordination, and failure-handling work.
Database Examples
Read replicas can serve suitable read workloads, but they do not automatically increase the primary’s write capacity. With asynchronous replication, a recent write may not appear on a replica immediately.
Sharding distributes different subsets of data across servers. It can spread storage and write load, but cross-shard queries and transactions become more complicated.
Choosing a First Step
If one slow query is scanning unnecessary rows, inspect its execution plan before buying a larger server. If reads dominate, consider whether replicas or caching fit the application’s freshness requirements. If writes or data size exceed one machine’s practical capacity, evaluate partitioning and sharding separately.
Scaling and high availability are related but different goals. Extra capacity is not a recovery plan. Decide how traffic is routed during failure and test the recovery procedure.


