Scalability is the measure of how your system can adapt to an increase in loads. i.e. how well your system performs when there is an increase in traffic on your website or app. We use two basic methods to scale a system.
- Vertical Scalability – This is when you are increasing the resources of the single system at hand. Maybe you are increasing the RAM or changing the processor to a more powerful one. The problem here is the cost as well as the hardware constraints. There is usually a limit beyond which you cannot increase the RAM size of a computer.
A popular example is databases where you need the entire thing to live on the same hard disk and cannot segregate it into different storage mediums as not every database supports parallel operations.
You can remember this as scale-up.
- Horizontal Scalability – This is when you add more instances of the same/different type to perform the same operation. i.e. you add more computers to perform the same job parallelly. A popular example of this is distributed systems.
A distributed system is when you have multiple systems connected via a network performing a task. A popular example is multiplayer games.
A common example of horizontal scaling is when we increase memory on our phones using a secondary memory card. We could have increased the RAM but that would be costlier compared to adding a readily available flash drive.
You can remember this as scale-out.
Availability is how responsive your system is. It’s more like a strategy we use to make our systems available across crashes. We usually make backups of our system so that even if something goes wrong we can restore it from the same state. Another example is availability zones on AWS where they keep another copy of your instance, so if one instance goes down, another one pops up immediately to support your customers.