Horizontal and Vertical Scaling In Databases Last Updated : 16 Jun, 2024 Comments Improve Suggest changes Like Article Like Report Scaling alters the 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, by adding a new system to the existing one, or both. Types of Scaling: Scaling can be categorized into 2 types: Vertical Scaling: When new resources are added to the existing system to meet the expectation, it is known as vertical scaling. Consider a rack of servers and resources that comprises 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 vertical scaling. Vertical scaling is based on the idea of adding more power(CPU, RAM) to existing systems, basically adding more resources.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 to the existing system to meet the higher expectation, it is known as horizontal scaling. Consider a rack of servers and resources that comprises 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 horizontal scaling. Horizontal scaling is based on the idea of adding more machines to our pool of resources. Horizontal scaling is difficult and also costlier than Vertical Scaling. It also requires more time to be fixed. Differences between Horizontal and Vertical Scaling are as follows: Horizontal ScalingVertical ScalingWhen new server racks are added to 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 scalingIt expands the size of the existing system horizontally.It expands the size of the existing system vertically.It is easier to upgrade.It is harder to upgrade and may involve downtime.It is difficult to implementIt is easy to implementIt is costlier, as new server racks comprise a lot of resourcesIt is cheaper as we need to just add new resourcesIt takes more time to be doneIt takes less time to be doneHigh resilience and fault toleranceSingle point of failureExamples of databases that can be easily scaled- Cassandra, MongoDB, Google Cloud SpannerExamples of databases that can be easily scaled- MySQL, Amazon RDS Comment More infoAdvertise with us R RishabhPrabhu Follow Improve Article Tags : DBMS Explore Basics of DBMSIntroduction of DBMS (Database Management System)6 min readHistory of DBMS7 min readDBMS Architecture 1-level, 2-Level, 3-Level6 min readDifference between File System and DBMS6 min readER & Relational ModelIntroduction of ER Model10 min readStructural Constraints of Relationships in ER Model5 min readGeneralization, Specialization and Aggregation in ER Model4 min readIntroduction of Relational Model and Codd Rules in DBMS14 min readKeys in Relational Model6 min readMapping from ER Model to Relational Model7 min readStrategies for Schema design in DBMS6 min readRelational AlgebraIntroduction of Relational Algebra in DBMS9 min readSQL Joins (Inner, Left, Right and Full Join)4 min readJoin operation Vs Nested query in DBMS3 min readTuple Relational Calculus (TRC) in DBMS4 min readDomain Relational Calculus in DBMS4 min readFunctional Dependencies & NormalisationAttribute Closure in DBMS4 min readArmstrong's Axioms in Functional Dependency in DBMS4 min readCanonical Cover of Functional Dependencies in DBMS7 min readNormal Forms in DBMS7 min readThe Problem of Redundancy in Database6 min readLossless Join and Dependency Preserving Decomposition4 min readDenormalization in Databases4 min readTransactions & Concurrency ControlACID Properties in DBMS5 min readTypes of Schedules in DBMS6 min readConcurrency Control in DBMS7 min readGraph Based Concurrency Control Protocol in DBMS4 min readMultiple Granularity Locking in DBMS3 min readDatabase Recovery Techniques in DBMS4 min readDeadlock in DBMS4 min readAdvanced DBMSIndexing in Databases6 min readIntroduction of B Tree8 min readIntroduction of B+ Tree5 min readBitmap Indexing in DBMS3 min readInverted Index7 min readSQL Queries on Clustered and Non-Clustered Indexes7 min readFile Organization in DBMS4 min readPractice QuestionsLast Minute Notes - DBMS15+ min readTop 60 DBMS Interview Questions with Answers for 202515+ min readCommonly asked DBMS Interview Questions | Set 25 min readDatabase Management System - GATE CSE Previous Year Questions2 min read Like