Beginner's guide to distributed systems (Clustered/loadbalancing)

Knowledge Drop

Last tested: Mar 27, 2019
 

Imagine that you have been tasked with carrying water from a well to the town. You have to meet the demands of the town with how much water to bring. We'll use this as an analogy to define our terms:

High Concurrency: This is purely the amount of volume of water you can carry. You can either increase your concurrency by getting a bigger bucket of water (more powerful server: "vertical scaling") or getting multiple buckets of water (clustered servers: "horizontal scaling"). Both achieve the same end goal, but unfortunately you can't get an infinitely big bucket of water, the largest they sell is 10 gallon buckets. If you want to carry more water, you'll need to get more buckets at this point.

High Availability: If you drop a bucket on the way, then there's a crack and all the water spills out. It doesn't matter how big your bucket is, if it has a hole, that water starts to leak. If you want to make sure you don't lose water, you need multiple buckets (a cluster), so if there's a hole in one, you can quickly pour the water over to another bucket - voila, no water lost. You can then worry about fixing the first bucket (duct tape works wonders). What would be really cool is if you actually connected all the buckets together with a system of flexible tubes (a load balancer), that would automatically move water from bucket to bucket to even out how full they are, so that nothing overflows, and no water is poured into cracked buckets.

High Performance: It doesn't matter how much water you can hold, if you walk too slowly to get the water to town. The faster you get the water from the well to the town, the more quickly you can get back to the well, and grab more water. Remember, for this analogy, walking speed with the water has nothing to do with how many buckets you are carrying, or how big/full they are. You eventually figure out you should use a bike to deliver the water - this is very high performance.

High Scalability: You typically only need to carry about a gallon of water at a time, but sometimes, you need to carry 50. If you just were to buy 50 buckets, then (while that would achieve high availability, and high concurrency) you're not dynamically scaling, so it's not considered "high scalability." But if you were to borrow some buckets from a friend on occasion, at a moment's notice, then you could use the 50 buckets only when needed, and the 1 gallon bucket the rest of the time, then the operation is now highly scalable.

This content is subject to limited support.                

Version history
Last update:
‎06-14-2021 05:52 PM
Updated by: