HackerPapers

arXiv:1608.01350cs.DS

Consistent Hashing with Bounded Loads

Vahab Mirrokni, Mikkel Thorup, Morteza Zadimoghaddam

Abstract

Designing algorithms for balanced allocation of clients to servers in dynamic settings is a challenging problem for a variety of reasons. Both servers and clients may be added and/or removed from the system periodically, and the main objectives of allocation algorithms are: the uniformity of the allocation, and the number of moves after adding or removing a server or a client. The most popular solution for our dynamic settings is Consistent Hashing. However, the load balancing of consistent hashing is no better than a random assignment of clients to servers, so with $n$ of each, we expect many servers to be overloaded with $Θ(\log n/ \log\log n)$ clients. In this paper, with $n$ clients and $n$ servers, we get a guaranteed max-load of 2 while only moving an expected constant number of clients for each update. We take an arbitrary user specified balancing parameter $c=1+ε>1$. With $m$ balls and $n$ bins in the system, we want no load above $\lceil cm/n\rceil$. Meanwhile we want to bound the expected number of balls that have to be moved when a ball or server is added or removed. Compared with general lower bounds without capacity constraints, we show that in our algorithm when a ball or bin is inserted or deleted, the expected number of balls that have to be moved is increased only by a multiplicative factor $O({1\over ε^2})$ for $ε\le 1$ (Theorem 4) and by a factor $1+O(\frac{\log c}c)$ for $ε\ge 1$ (Theorem 3). Technically, the latter bound is the most challenging to prove. It implies that we for superconstant $c$ only pay a negligible cost in extra moves. We also get the same bounds for the simpler problem where we instead of a user specified balancing parameter have a fixed bin capacity $C$ for all bins.

arXiv comments
Journal reference
DOI
Subjects
cs.DSData Structures and Algorithms

On Hacker News

Linked by 3 identifiable commenters in 3 comments across 3 threads, from Nov 2017 to Sep 2025. Found in 1 HN submission from Dec 2016 to Dec 2016. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments3 threads

    • How we run it: Auto-scaled Kubernetes deployments, one for each availability zone, currently on m*gd instances which give us local NVMe. The pods are able to easily push GiBps with 1-2 CPUs used — network is the bottleneck so we made it a scaling dimension (thanks KEDA). On the…

      shikharView on HNParent context

    • The key paper (Consistent Hashing with Bounded Loads) referenced in the video: [0]. Here's a similar talk by the same presenter (Andrew Rodland) from HAProxyConf 2019: [1]. It's a bit broader and less iterative/historical which I preferred about the OP. [0]…

      nwsmView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.