<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
consistent	B-Algorithm
hashing	I-Algorithm
is	O
a	O
special	O
kind	O
of	O
hashing	B-Error_Name
technique	O
such	O
that	O
when	O
a	O
hash	B-Algorithm
table	I-Algorithm
is	O
resized	O
,	O
only	O
keys	O
need	O
to	O
be	O
remapped	O
on	O
average	O
where	O
is	O
the	O
number	O
of	O
keys	O
and	O
is	O
the	O
number	O
of	O
slots	O
.	O
</s>
<s>
In	O
contrast	O
,	O
in	O
most	O
traditional	O
hash	B-Algorithm
tables	I-Algorithm
,	O
a	O
change	O
in	O
the	O
number	O
of	O
array	O
slots	O
causes	O
nearly	O
all	O
keys	O
to	O
be	O
remapped	O
because	O
the	O
mapping	O
between	O
the	O
keys	O
and	O
the	O
slots	O
is	O
defined	O
by	O
a	O
modular	O
operation	O
.	O
</s>
<s>
The	O
term	O
"	O
consistent	B-Algorithm
hashing	I-Algorithm
"	O
was	O
introduced	O
by	O
David	O
Karger	O
et	O
al	O
.	O
</s>
<s>
at	O
MIT	O
for	O
use	O
in	O
distributed	B-Operating_System
caching	I-Operating_System
,	O
particularly	O
for	O
the	O
web	O
.	O
</s>
<s>
This	O
academic	O
paper	O
from	O
1997	O
in	O
Symposium	O
on	O
Theory	O
of	O
Computing	O
introduced	O
the	O
term	O
"	O
consistent	B-Algorithm
hashing	I-Algorithm
"	O
as	O
a	O
way	O
of	O
distributing	O
requests	O
among	O
a	O
changing	O
population	O
of	O
web	B-Application
servers	I-Application
.	O
</s>
<s>
Each	O
slot	O
is	O
then	O
represented	O
by	O
a	O
server	O
in	O
a	O
distributed	O
system	O
or	O
cluster	B-Architecture
.	O
</s>
<s>
The	O
authors	O
mention	O
linear	B-Algorithm
hashing	I-Algorithm
and	O
its	O
ability	O
to	O
handle	O
sequential	O
server	O
addition	O
and	O
removal	O
,	O
while	O
consistent	B-Algorithm
hashing	I-Algorithm
allows	O
servers	O
to	O
be	O
added	O
and	O
removed	O
in	O
an	O
arbitrary	O
order	O
.	O
</s>
<s>
The	O
paper	O
was	O
later	O
re-purposed	O
to	O
address	O
technical	O
challenge	O
of	O
keeping	O
track	O
of	O
a	O
file	O
in	O
peer-to-peer	O
networks	O
such	O
as	O
a	O
distributed	B-Operating_System
hash	I-Operating_System
table	I-Operating_System
.	O
</s>
<s>
Teradata	O
still	O
uses	O
the	O
concept	O
of	O
a	O
hash	B-Algorithm
table	I-Algorithm
to	O
fulfill	O
exactly	O
this	O
purpose	O
.	O
</s>
<s>
Akamai	B-Application
Technologies	I-Application
was	O
founded	O
in	O
1998	O
by	O
the	O
scientists	O
Daniel	O
Lewin	O
and	O
F	O
.	O
Thomson	O
Leighton	O
(	O
co-authors	O
of	O
the	O
article	O
coining	O
"	O
consistent	B-Algorithm
hashing	I-Algorithm
"	O
)	O
.	O
</s>
<s>
In	O
Akamai	B-Application
's	O
content	O
delivery	O
network	O
,	O
consistent	B-Algorithm
hashing	I-Algorithm
is	O
used	O
to	O
balance	O
the	O
load	O
within	O
a	O
cluster	B-Architecture
of	O
servers	O
,	O
while	O
a	O
stable	O
marriage	O
algorithm	O
is	O
used	O
to	O
balance	O
load	O
across	O
clusters	O
.	O
</s>
<s>
Consistent	B-Algorithm
hashing	I-Algorithm
has	O
also	O
been	O
used	O
to	O
reduce	O
the	O
impact	O
of	O
partial	O
system	O
failures	O
in	O
large	O
web	O
applications	O
to	O
provide	O
robust	O
caching	O
without	O
incurring	O
the	O
system-wide	O
fallout	O
of	O
a	O
failure	O
.	O
</s>
<s>
Consistent	B-Algorithm
hashing	I-Algorithm
is	O
also	O
the	O
cornerstone	O
of	O
distributed	B-Operating_System
hash	I-Operating_System
tables	I-Operating_System
(	O
DHTs	O
)	O
,	O
which	O
employ	O
hash	B-Error_Name
values	I-Error_Name
to	O
partition	O
a	O
keyspace	O
across	O
a	O
distributed	O
set	O
of	O
nodes	O
,	O
then	O
construct	O
an	O
overlay	O
network	O
of	O
connected	O
nodes	O
that	O
provide	O
efficient	O
node	O
retrieval	O
by	O
key	O
.	O
</s>
<s>
Rendezvous	B-Algorithm
hashing	I-Algorithm
,	O
designed	O
in	O
1996	O
,	O
is	O
a	O
simpler	O
and	O
more	O
general	O
technique	O
.	O
</s>
<s>
It	O
achieves	O
the	O
goals	O
of	O
consistent	B-Algorithm
hashing	I-Algorithm
using	O
the	O
very	O
different	O
highest	B-Algorithm
random	I-Algorithm
weight	I-Algorithm
(	O
HRW	O
)	O
algorithm	O
.	O
</s>
<s>
In	O
the	O
problem	O
of	O
load	B-Application
balancing	I-Application
,	O
for	O
example	O
,	O
when	O
a	O
BLOB	B-General_Concept
has	O
to	O
be	O
assigned	O
to	O
one	O
of	O
servers	O
on	O
a	O
cluster	B-Architecture
,	O
a	O
standard	O
hash	B-Error_Name
function	I-Error_Name
could	O
be	O
used	O
in	O
such	O
a	O
way	O
that	O
we	O
calculate	O
the	O
hash	B-Error_Name
value	I-Error_Name
for	O
that	O
BLOB	B-General_Concept
,	O
assuming	O
the	O
resultant	O
value	O
of	O
the	O
hash	B-Error_Name
is	O
,	O
we	O
perform	O
modular	O
operation	O
with	O
the	O
number	O
of	O
servers	O
(	O
in	O
this	O
case	O
)	O
to	O
determine	O
the	O
server	O
in	O
which	O
we	O
can	O
place	O
the	O
BLOB	B-General_Concept
:	O
;	O
hence	O
the	O
BLOB	B-General_Concept
will	O
be	O
placed	O
in	O
the	O
server	O
whose	O
is	O
successor	O
of	O
in	O
this	O
case	O
.	O
</s>
<s>
However	O
,	O
when	O
a	O
server	O
is	O
added	O
or	O
removed	O
during	O
outage	O
or	O
scaling	O
(	O
when	O
changes	O
)	O
,	O
all	O
the	O
BLOBs	B-General_Concept
in	O
every	O
server	O
should	O
be	O
reassigned	O
and	O
moved	O
due	O
to	O
rehashing	O
,	O
but	O
this	O
operation	O
is	O
expensive	O
.	O
</s>
<s>
Consistent	B-Algorithm
hashing	I-Algorithm
was	O
designed	O
to	O
avoid	O
the	O
problem	O
of	O
having	O
to	O
reassign	O
every	O
BLOB	B-General_Concept
when	O
a	O
server	O
is	O
added	O
or	O
removed	O
throughout	O
the	O
cluster	B-Architecture
.	O
</s>
<s>
The	O
central	O
idea	O
is	O
,	O
we	O
use	O
a	O
hash	B-Error_Name
function	I-Error_Name
that	O
randomly	O
maps	O
both	O
the	O
BLOB	B-General_Concept
and	O
servers	O
to	O
a	O
unit	O
circle	O
,	O
usually	O
radians	O
.	O
</s>
<s>
For	O
example	O
,	O
(	O
where	O
is	O
hash	B-Error_Name
of	O
a	O
BLOB	B-General_Concept
or	O
server	O
's	O
identifier	O
,	O
like	O
IP	B-Protocol
address	I-Protocol
or	O
UUID	O
)	O
.	O
</s>
<s>
Each	O
BLOB	B-General_Concept
is	O
then	O
assigned	O
to	O
the	O
next	O
server	O
that	O
appears	O
on	O
the	O
circle	O
in	O
clockwise	O
order	O
.	O
</s>
<s>
Usually	O
,	O
binary	O
search	O
algorithm	O
or	O
linear	B-Algorithm
search	I-Algorithm
is	O
used	O
to	O
find	O
a	O
"	O
spot	O
"	O
or	O
server	O
to	O
place	O
that	O
particular	O
BLOB	B-General_Concept
in	O
or	O
complexities	O
respectively	O
;	O
and	O
in	O
every	O
iteration	O
,	O
which	O
happens	O
in	O
clockwise	O
manner	O
,	O
an	O
operation	O
(	O
where	O
is	O
the	O
value	O
of	O
the	O
server	O
within	O
the	O
cluster	B-Architecture
)	O
is	O
performed	O
to	O
find	O
the	O
server	O
to	O
place	O
the	O
BLOB	B-General_Concept
.	O
</s>
<s>
This	O
provides	O
an	O
even	O
distribution	O
of	O
BLOBs	B-General_Concept
to	O
servers	O
.	O
</s>
<s>
But	O
,	O
more	O
importantly	O
,	O
if	O
a	O
server	O
fails	O
and	O
is	O
removed	O
from	O
the	O
circle	O
,	O
only	O
the	O
BLOBs	B-General_Concept
that	O
were	O
mapped	O
to	O
the	O
failed	O
server	O
need	O
to	O
be	O
reassigned	O
to	O
the	O
next	O
server	O
in	O
clockwise	O
order	O
.	O
</s>
<s>
Likewise	O
,	O
if	O
a	O
new	O
server	O
is	O
added	O
,	O
it	O
is	O
added	O
to	O
the	O
unit	O
circle	O
,	O
and	O
only	O
the	O
BLOBs	B-General_Concept
mapped	O
to	O
that	O
server	O
need	O
to	O
be	O
reassigned	O
.	O
</s>
<s>
Importantly	O
,	O
when	O
a	O
server	O
is	O
added	O
or	O
removed	O
,	O
the	O
vast	O
majority	O
of	O
the	O
BLOBs	B-General_Concept
maintain	O
their	O
prior	O
server	O
assignments	O
,	O
and	O
the	O
addition	O
of	O
server	O
only	O
causes	O
fraction	O
of	O
the	O
BLOBs	B-General_Concept
to	O
relocate	O
.	O
</s>
<s>
Although	O
the	O
process	O
of	O
moving	O
BLOBs	B-General_Concept
across	O
cache	B-Protocol
servers	I-Protocol
in	O
the	O
cluster	B-Architecture
depends	O
on	O
the	O
context	O
,	O
commonly	O
,	O
the	O
newly	O
added	O
cache	B-Protocol
server	I-Protocol
identifies	O
its	O
"	O
successor	O
"	O
and	O
moves	O
all	O
the	O
BLOBs	B-General_Concept
,	O
whose	O
mapping	O
belongs	O
to	O
this	O
server	O
(	O
i.e.	O
</s>
<s>
whose	O
hash	B-Error_Name
value	I-Error_Name
is	O
less	O
than	O
that	O
of	O
the	O
new	O
server	O
)	O
,	O
from	O
it	O
.	O
</s>
<s>
However	O
,	O
in	O
the	O
case	O
of	O
web	B-Protocol
page	I-Protocol
caches	I-Protocol
,	O
in	O
most	O
implementations	O
there	O
is	O
no	O
involvement	O
of	O
moving	O
or	O
copying	O
,	O
assuming	O
the	O
cached	O
BLOB	B-General_Concept
is	O
small	O
enough	O
.	O
</s>
<s>
When	O
a	O
request	O
hits	O
a	O
newly	O
added	O
cache	B-Protocol
server	I-Protocol
,	O
a	O
cache	O
miss	O
happens	O
and	O
a	O
request	O
to	O
the	O
actual	O
web	B-Application
server	I-Application
is	O
made	O
and	O
the	O
BLOB	B-General_Concept
is	O
cached	O
locally	O
for	O
future	O
requests	O
.	O
</s>
<s>
The	O
redundant	O
BLOBs	B-General_Concept
on	O
the	O
previously	O
used	O
cache	B-Protocol
servers	I-Protocol
would	O
be	O
removed	O
as	O
per	O
the	O
cache	B-General_Concept
eviction	I-General_Concept
policies	I-General_Concept
.	O
</s>
<s>
Let	O
and	O
be	O
the	O
hash	B-Error_Name
functions	I-Error_Name
used	O
for	O
the	O
BLOB	B-General_Concept
and	O
server	O
's	O
unique	O
identifier	O
respectively	O
.	O
</s>
<s>
In	O
practice	O
,	O
a	O
binary	B-Language
search	I-Language
tree	I-Language
(	O
BST	O
)	O
is	O
used	O
to	O
dynamically	O
maintain	O
the	O
within	O
a	O
cluster	B-Architecture
or	O
hashring	O
,	O
and	O
to	O
find	O
the	O
successor	O
or	O
minimum	O
within	O
the	O
BST	O
,	O
tree	B-Algorithm
traversal	I-Algorithm
is	O
used	O
.	O
</s>
<s>
Let	O
be	O
the	O
hash	B-Error_Name
value	I-Error_Name
of	O
a	O
BLOB	B-General_Concept
such	O
that	O
,	O
where	O
and	O
.	O
</s>
<s>
To	O
insert	O
,	O
find	O
the	O
successor	O
of	O
in	O
the	O
BST	O
of	O
s	O
.	O
If	O
is	O
larger	O
than	O
all	O
of	O
the	O
s	O
,	O
the	O
BLOB	B-General_Concept
is	O
placed	O
in	O
the	O
server	O
with	O
smallest	O
value	O
.	O
</s>
<s>
Find	O
the	O
successor	O
of	O
in	O
the	O
BST	O
,	O
remove	O
the	O
BLOB	B-General_Concept
from	O
the	O
returned	O
.	O
</s>
<s>
If	O
has	O
no	O
successor	O
,	O
remove	O
the	O
BLOB	B-General_Concept
from	O
the	O
smallest	O
of	O
the	O
s	O
.	O
</s>
<s>
Let	O
be	O
the	O
hash	B-Error_Name
value	I-Error_Name
of	O
a	O
server	O
's	O
identifier	O
such	O
that	O
,	O
where	O
and	O
.	O
</s>
<s>
Move	O
all	O
the	O
BLOBs	B-General_Concept
,	O
whose	O
hash	B-Error_Name
value	I-Error_Name
is	O
smaller	O
than	O
,	O
from	O
the	O
server	O
whose	O
is	O
successor	O
of	O
.	O
</s>
<s>
If	O
is	O
largest	O
of	O
all	O
the	O
s	O
,	O
move	O
the	O
relevant	O
BLOBs	B-General_Concept
from	O
the	O
smallest	O
of	O
the	O
s	O
into	O
.	O
</s>
<s>
Find	O
the	O
successor	O
of	O
in	O
the	O
BST	O
,	O
move	O
the	O
BLOBs	B-General_Concept
from	O
into	O
its	O
successor	O
server	O
.	O
</s>
<s>
If	O
does	O
n't	O
have	O
a	O
successor	O
,	O
move	O
the	O
BLOBs	B-General_Concept
into	O
the	O
smallest	O
of	O
the	O
s	O
.	O
</s>
<s>
To	O
avoid	O
skewness	B-General_Concept
of	O
multiple	O
nodes	O
within	O
the	O
radian	O
,	O
which	O
happen	O
due	O
to	O
lack	O
of	O
randomness	O
in	O
the	O
distribution	O
of	O
the	O
servers	O
within	O
the	O
cluster	B-Architecture
,	O
multiple	O
labels	O
are	O
used	O
.	O
</s>
<s>
multiple	O
labels	O
which	O
point	O
to	O
a	O
single	O
"	O
real	O
"	O
label	O
or	O
server	O
within	O
the	O
cluster	B-Architecture
.	O
</s>
<s>
The	O
amount	O
of	O
virtual	O
nodes	O
or	O
duplicate	O
labels	O
used	O
for	O
a	O
particular	O
server	O
within	O
a	O
cluster	B-Architecture
is	O
called	O
the	O
"	O
weight	O
"	O
of	O
that	O
particular	O
server	O
.	O
</s>
<s>
A	O
number	O
of	O
extensions	O
to	O
the	O
basic	O
technique	O
are	O
needed	O
for	O
effectively	O
using	O
consistent	B-Algorithm
hashing	I-Algorithm
for	O
load	B-Application
balancing	I-Application
in	O
practice	O
.	O
</s>
<s>
In	O
the	O
basic	O
scheme	O
above	O
,	O
if	O
a	O
server	O
fails	O
,	O
all	O
its	O
BLOBs	B-General_Concept
are	O
reassigned	O
to	O
the	O
next	O
server	O
in	O
clockwise	O
order	O
,	O
potentially	O
doubling	O
the	O
load	O
of	O
that	O
server	O
.	O
</s>
<s>
To	O
ensure	O
a	O
more	O
even	O
redistribution	O
of	O
BLOBs	B-General_Concept
on	O
server	O
failure	O
,	O
each	O
server	O
can	O
be	O
hashed	O
to	O
multiple	O
locations	O
on	O
the	O
unit	O
circle	O
.	O
</s>
<s>
When	O
a	O
server	O
fails	O
,	O
the	O
BLOBs	B-General_Concept
assigned	O
to	O
each	O
of	O
its	O
replicas	O
on	O
the	O
unit	O
circle	O
will	O
get	O
reassigned	O
to	O
a	O
different	O
server	O
in	O
clockwise	O
order	O
,	O
thus	O
redistributing	O
the	O
BLOBs	B-General_Concept
more	O
evenly	O
.	O
</s>
<s>
Another	O
extension	O
concerns	O
a	O
situation	O
where	O
a	O
single	O
BLOB	B-General_Concept
gets	O
"	O
hot	O
"	O
and	O
is	O
accessed	O
a	O
large	O
number	O
of	O
times	O
and	O
will	O
have	O
to	O
be	O
hosted	O
in	O
multiple	O
servers	O
.	O
</s>
<s>
In	O
this	O
situation	O
,	O
the	O
BLOB	B-General_Concept
may	O
be	O
assigned	O
to	O
multiple	O
contiguous	O
servers	O
by	O
traversing	O
the	O
unit	O
circle	O
in	O
clockwise	O
order	O
.	O
</s>
<s>
A	O
more	O
complex	O
practical	O
consideration	O
arises	O
when	O
two	O
BLOBs	B-General_Concept
are	O
hashed	O
near	O
each	O
other	O
in	O
the	O
unit	O
circle	O
and	O
both	O
get	O
"	O
hot	O
"	O
at	O
the	O
same	O
time	O
.	O
</s>
<s>
In	O
this	O
case	O
,	O
both	O
BLOBs	B-General_Concept
will	O
use	O
the	O
same	O
set	O
of	O
contiguous	O
servers	O
in	O
the	O
unit	O
circle	O
.	O
</s>
<s>
This	O
situation	O
can	O
be	O
ameliorated	O
by	O
each	O
BLOB	B-General_Concept
choosing	O
a	O
different	O
hash	B-Error_Name
function	I-Error_Name
for	O
mapping	O
servers	O
to	O
the	O
unit	O
circle	O
.	O
</s>
<s>
Rendezvous	B-Algorithm
hashing	I-Algorithm
,	O
designed	O
in	O
1996	O
,	O
is	O
a	O
simpler	O
and	O
more	O
general	O
technique	O
,	O
and	O
permits	O
fully	O
distributed	O
agreement	O
on	O
a	O
set	O
of	O
options	O
out	O
of	O
a	O
possible	O
set	O
of	O
options	O
.	O
</s>
<s>
It	O
can	O
in	O
fact	O
be	O
shown	O
that	O
consistent	B-Algorithm
hashing	I-Algorithm
is	O
a	O
special	O
case	O
of	O
rendezvous	B-Algorithm
hashing	I-Algorithm
.	O
</s>
<s>
Because	O
of	O
its	O
simplicity	O
and	O
generality	O
,	O
rendezvous	B-Algorithm
hashing	I-Algorithm
is	O
now	O
being	O
used	O
in	O
place	O
of	O
Consistent	B-Algorithm
Hashing	I-Algorithm
in	O
many	O
applications	O
.	O
</s>
<s>
If	O
key	O
values	O
will	O
always	O
increase	O
monotonically	O
,	O
an	O
alternative	O
approach	O
using	O
a	O
hash	B-Algorithm
table	I-Algorithm
with	O
monotonic	O
keys	O
may	O
be	O
more	O
suitable	O
than	O
consistent	B-Algorithm
hashing	I-Algorithm
.	O
</s>
<s>
The	O
is	O
an	O
average	O
cost	O
for	O
redistribution	O
of	O
keys	O
and	O
the	O
complexity	O
for	O
consistent	B-Algorithm
hashing	I-Algorithm
comes	O
from	O
the	O
fact	O
that	O
a	O
binary	O
search	O
among	O
nodes	O
angles	O
is	O
required	O
to	O
find	O
the	O
next	O
node	O
on	O
the	O
ring	O
.	O
</s>
<s>
Known	O
examples	O
of	O
consistent	B-Algorithm
hashing	I-Algorithm
use	O
include	O
:	O
</s>
