Scalability
- Tags
- sys-design
Refers to the ability of a system to scale. What this means is that the performance of the system increases in a manner proportional to the resources added to it.
We can define performance as serving more units of work, but it can also be handling larger units of work (such as when datasets grow).
- If you have a performance problem, your system is slow for a single user.
- If you have a scalability problem, your system is fast for a single user but slow under heavy load.
We define:
Scale | Description |
---|---|
Horizontal Scaling | You can increase throughput by buying more hardware |
Vertical Scaling | Increasing the capacity and performance of your existing hardware |
If your bored, read through this. It takes a few minutes (20 maybe) and it's really funny.
Disadvantages
- Scaling horizontally introduces complexity and involves cloning servers
- Servers should be stateless: they should not contain any user-related data like sessions or profile pictures
- Sessions can be stored in a centralized data store such as a database (SQL, NoSQL) or a persistent cache (Redis, Memcached)
- Downstream servers such as caches and databases need to handle more simultaneous connections as upstream servers scale out