Consistent hashing applies a hash function to the key (rather than using the raw key directly) and uses the result to choose which node stores the data:
n = node_count h = hash(key) save(mod(h, n), data)
When the hash table size (i.e., the number of nodes) changes, only about keys are remapped on average. With URL-based hashing, a given request consistently routes to the same node. The idea was originally developed for web caching to maintain a high cache hit rate even as cache nodes are added or removed, and it is also used to reduce reallocation issues when scaling systems like Redis. In practice, servers form a hash ring so that adding or removing nodes causes minimal data movement.
Consistent Hashing 일관된 해싱
분산 처리 기법 중의 하나이다.파티셔닝이나 로드 밸런싱 등 분산 처리에서 사용하는 방법 중 하나라고 할 수 있다.Karger 등이 소개한 기법이고, 해당 논문은 여기서 볼 수 있다. 파티셔닝이나 로드 밸런싱을 할 때 Key를 기반으로 하면 문제가 생겨서 나온 방법이다.예를 들어, 이름을 A~Z 로 정렬한 데이터를 파티셔닝 한다고 해보자.이때 key를 'A', 'B' ...
https://cottonblue.tistory.com/30
Consistent Hashing
분산 캐싱 구현을 위한 Consistent Hashing 알고리즘 | 필자는 지난주에 "if kakao 개발자 컨퍼런스"를 다녀왔다. 매우 유익한 시간이었는데, 세미나에 대한 후기는 필자의 이전 글을 참고하길 바란다. https://brunch.co.kr/@springboot/254 필자는 수많은 세션 중에서, "카카오톡 적용 사례를 통해 살펴보는 카카오 클라우드의 Kubernetes as a Service" 라는 주제의 세
https://brunch.co.kr/@springboot/258

Seonglae Cho