Scalability | horizontal vs vertical scalability
Scalability is the measure of a system's ability to handle varying amounts of work by adding or removing resources from the system.
Horizontal scaling (aka scaling out) refers to adding additional nodes or machines to your infrastructure to cope with new demands. If you are hosting an application on a server and find that it no longer has the capacity or capabilities to handle traffic, adding a server may be your solution. (Or) is is about buying more machines of similar types.
Vertical scaling (aka scaling up) describes adding additional resources to a system so that it meets demand. (OR) Optimizing the process and increase the throughput with the same resource, is called vertical scaling.
Advantages of horizontal scaling
1. Scaling is easier from a hardware perspective - It eliminates the need to analyze which system specifications you need to upgrade.
2. Fewer periods of downtime - If done effectively, there may never be a need for downtime and clients are less likely to be impacted.
3. Increased resilience and fault tolerance
4. Increased performance
Disadvantages of horizontal scaling
1. Increased complexity of maintenance and operation
2. Increased Initial costs - Adding new servers is far more expensive than upgrading old ones.
Advantages of vertical scaling
1. Cost-effective - Upgrading a pre-existing server costs less than purchasing a new one.
2. Less complex process communication - When a single node handles all the layers of your services, it will not have to synchronize and communicate with other machines to work. This may result in faster responses.
3. Less complicated maintenance - since you don't have the number of nodes you will need to manage.
4. Less need for software changes
Disadvantages of vertical scaling
1. Higher possibility for downtime - Unless you have a backup server that can handle operations and requests, you will need some considerable downtime to upgrade your machine.
2. Single point of failure - Having all your operations on a single server increases the risk of losing all your data if a hardware or software failure was to occur.
3. Upgrade limitations - There is a limitation to how much you can upgrade a machine. Every machine has its threshold for RAM, storage, and processing power.
Quick Differences
Horizontal Vertical
1. Load balancing require N/A
2. Resilient Single point of failure
3. N/w call b/w 2 service (RPC) - Slow Inter process communication (IPC) - Fast
4. Data consistency need to handle Consistent - since single system
5. Scales well as users increase Hardware limitations
Comments
Post a Comment