Scaling
Scaling in system design is the process of adding increased volumes of connections data while maintaining the same system contact of reliability or availabilty.
Scaling is broken into 2 categories: Horizontal and Vertical scaling
Vertical scaling is generally the easier to understand approach which involves just adding more ram, cpu’s, disk space, or faster hardware to a single machine. Unfortunately for this approach, vertically scaling has limitations on how much hardware can be added and upgraded to a single server. Additionally costs increase much more significantly compared to the other approach which is horizontal scaling.
Advantages of vertical scaling are:
- 1. Hardware is know and centrally located
- 2. Upgrading is straightforward since hardware simply needs to be replaced
- 3. Simpler to manage the system since its a single point
- 4. Single point of deployment. No complex deployment system needs to be tweaked or changed as software changes
Disadvantages of vertical scaling are:
- 1. Single point of failure
- 2. Poor cost scaling
- 3. Generally specialized skill set to work on higher end system
- 4. Central geolocation - network latency will be an issue cross globe
- 5. Max system load constraints
Horizontal scaling is the opposite of vertical scaling. Instead of upgrading a single machine more machines are bought. This provides its own sets of challenges, but ultimately allows more availability, performance, and cheaper hardware
Advantages of horizontal scaling are:
- 1. Generally a lot cheaper as more hardware is added
- 2. Lower fault tolerance
- 3. Lower downtime
- 4. Lessened load across the whole system
Disadvantages of horizontal scaling are:
- 1. Increase complexity of the whole system
- 2. Deploy process and scaling process for whole system is generally much more complex
- 3. User and System sessions should generally be stateless for the individual servers
- 4. Load balancers are required to distribute the load equal across the system
- 5. Consistency is much hard since data is distributed across physical distance
- One server may not necessarily equal one functionality