From 99419133f575ec99abfabf3681c81617a24724ee Mon Sep 17 00:00:00 2001 From: werbenhu Date: Sat, 9 Sep 2023 11:19:39 +0800 Subject: [PATCH] Update README.md --- README.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/README.md b/README.md index d8d12d4..0d14313 100644 --- a/README.md +++ b/README.md @@ -16,15 +16,6 @@ > Consistent hashing is a hashing technique that performs really well when operated in a dynamic environment where the distributed system scales up and scales down frequently. -### The problem of naive hashing function - -A naive hashing function is key % n where n is the number of servers. -It has two major drawbacks: -1. NOT horizontally scalable, or in other words, NOT partition tolerant. When you add new servers, all existing mapping are broken. It could introduce painful maintenance work and downtime to the system. -2. May NOT be load balanced. If the data is not uniformly distributed, this might cause some servers to be hot and saturated while others idle and almost empty. - -Problem 2 can be resolved by hashing the key first, hash(key) % n, so that the hashed keys will be likely to be distributed more evenly. But this can't solve the problem 1. We need to find a solution that can distribute the keys and is not dependent on n. - ### Consistent Hashing Consistent Hashing allows distributing data in such a way that minimize reorganization when nodes are added or removed, hence making the system easier to scale up or down.