19.2 How to Scale and Stabilize Workloads in Enterprise-Level Organisations
Vertical Scaling Limitations and Horizontal Scaling to the rescue
- Before attempting horizontal scaling, it is usually always good to exhaust the portion of vertical scaling where costs climb linearly with computation.
High Availability is achieved by
Using Load balancers in Horizontal scaling
Imagine a restaurant with one chef that is trying to serve meals to a hundred customers at once.
The chef can only cook one meal at a time, so the customers are getting frustrated with long wait times and some of them are leaving.This is because the chef is overloaded and cannot handle the intense workload.
Now, imagine the restaurant hires three more chefs, all with the same skills and equipment as the first chef. The restaurant invests in a system where each chef has a buzzer that goes off when there are new orders waiting for them. The buzzer ensures that each chef knows exactly when they need to start cooking a new meal, and they do not get overwhelmed by too many orders at once.
In this analogy, the chefs represent servers or clusters, and the buzzer represents a load balancer.
Maintaining a backup of the load balancer and the database/NAS.
- Adding Autoscaling (i.e. you save money when traffic is low)
- Many autoscaling frameworks these days assume that applications are mostly stateless.