Scaling alters size of a system. In the scaling process, we either compress or expand the system to meet the expected needs. The scaling operation can be achieved by adding resources to meet the smaller expectation in the current system, or by adding a new system in the existing one, or both.
Types of Scaling:
Scaling can be categorised into 2 types:
- Vertical Scaling: When new resources are added in the existing system to meet the expectation, it is known as vertical scaling.
Consider a rack of servers and resources that comprises of the existing system. (as shown in the figure). Now when the existing system fails to meet the expected needs, and the expected needs can be met by just adding resources, this is considered as vertical scaling.
Vertical scaling is not only easy but also cheaper than Horizontal Scaling. It also requires less time to be fixed.
- Horizontal Scaling: When new server racks are added in the existing system to meet the higher expectation, it is known as horizontal scaling.
Consider a rack of servers and resources that comprises of the existing system. (as shown in the figure). Now when the existing system fails to meet the expected needs, and the expected needs cannot be met by just adding resources, we need to add completely new servers. This is considered as horizontal scaling.
Horizontal scaling is difficult and also costlier than Vertical Scaling. It also requires more time to be fixed.
Difference between Horizontal and Vertical Scaling:
|Horizontal Scaling||Vertical Scaling|
|When new server racks are added in the existing system to meet the higher expectation, it is known as horizontal scaling.||When new resources are added in the existing system to meet the expectation, it is known as vertical scaling|
|It expands the size of the existing system horizontally.||It expands the size of the existing system vertically.|
|It is difficult to implement||It is easy to implement|
|It is costlier, as new server racks comprises of a lot of resources||It is cheaper as we need to just add new resources|
|It takes more time to be done||It takes less time to be done|
GeeksforGeeks has prepared a complete interview preparation course with premium videos, theory, practice problems, TA support and many more features. Please refer Placement 100 for details
- Indexing in Databases | Set 1
- Denormalization in Databases
- Introduction to Graph Databases
- Active Databases
- Types of Databases
- Concepts of Distributed databases
- Problems due to database unavailability
- Difference between Cassandra and MongoDB
- Difference between ALTER and UPDATE Command in SQL
- Cartesian Product Operation in Relational Algebra
- Multivalued Dependency (MVD) in DBMS
- SELECT Operation in Relational Algebra
- The CAP Theorem in DBMS
- Job Control Language (JCL) Utilities
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.