Horizontal Scaling
Two directions
Vertical scaling makes one machine bigger. It is often the simplest move and may require no application changes, but it ends at the largest useful instance and leaves one machine as a failure domain unless another copy can take over.
Horizontal scaling adds more machines. Capacity becomes something you buy in increments, and losing one node costs a fraction of it rather than all of it. Stateless application replicas make this easy because any replica can serve any request. Stateful systems can scale horizontally too, but only by adding partitioning, replication, or coordination.
Almost every real system does both. You scale the stateless tier horizontally because it is easy, and you scale the database vertically for as long as you can get away with — because scaling that horizontally is the hardest problem in this curriculum.
Statelessness is not a property of your servers. It is a property of where you decided to keep state.
3 components2 connections0:00
Recording…