consistent hashing solves: minimizes key redistribution when servers are added/removed

Ever wonder why adding or removing servers doesn't mess up your favorite streaming service?

Image: United States Department of Energy, Public domain, via Wikimedia Commons

consistent hashing solves: minimizes key redistribution when servers are added/removed

Ever wonder why adding or removing servers doesn't mess up your favorite streaming service?

Imagine you're organizing a party and want to ensure everyone gets a seat, even if some friends drop in or leave unexpectedly.

Think of consistent hashing like a party where each friend has a unique seat number. If a friend arrives or leaves, only a few friends need to move seats, not everyone.

Example

If you have 10 friends (keys) and 5 seats (slots), adding a new friend means only 2 friends (10/5) need to find new seats.

Remember this

Consistent hashing minimizes the need to rearrange seats (keys) when friends (servers) arrive or leave.

Related concepts

Swipe through 100 ML concepts daily

Open Pocket Polymath