<s>
Replication	O
in	O
computing	O
involves	O
sharing	O
information	O
so	O
as	O
to	O
ensure	O
consistency	O
between	O
redundant	O
resources	O
,	O
such	O
as	O
software	O
or	O
hardware	B-Architecture
components	O
,	O
to	O
improve	O
reliability	B-Protocol
,	O
fault-tolerance	B-General_Concept
,	O
or	O
accessibility	O
.	O
</s>
<s>
The	O
replication	O
itself	O
should	O
be	O
transparent	B-Operating_System
to	O
an	O
external	O
user	O
.	O
</s>
<s>
In	O
a	O
failure	O
scenario	O
,	O
a	O
failover	B-General_Concept
of	O
replicas	O
should	O
be	O
hidden	O
as	O
much	O
as	O
possible	O
with	O
respect	O
to	O
quality	O
of	O
service	O
.	O
</s>
<s>
When	O
one	O
leader	O
replica	O
is	O
designated	O
via	O
leader	B-Operating_System
election	I-Operating_System
to	O
process	O
all	O
the	O
requests	O
,	O
the	O
system	O
is	O
using	O
a	O
primary-backup	O
or	O
primary-replica	B-Operating_System
scheme	O
,	O
which	O
is	O
predominant	O
in	O
high-availability	B-General_Concept
clusters	I-General_Concept
.	O
</s>
<s>
In	O
comparison	O
,	O
if	O
any	O
replica	O
can	O
process	O
a	O
request	O
and	O
distribute	O
a	O
new	O
state	O
,	O
the	O
system	O
is	O
using	O
a	O
multi-primary	O
or	O
multi-master	B-Operating_System
scheme	O
.	O
</s>
<s>
In	O
the	O
latter	O
case	O
,	O
some	O
form	O
of	O
distributed	B-Operating_System
concurrency	I-Operating_System
control	I-Operating_System
must	O
be	O
used	O
,	O
such	O
as	O
a	O
distributed	B-Operating_System
lock	I-Operating_System
manager	I-Operating_System
.	O
</s>
<s>
Load	B-Application
balancing	I-Application
differs	O
from	O
task	O
replication	O
,	O
since	O
it	O
distributes	O
a	O
load	O
of	O
different	O
computations	O
across	O
machines	O
,	O
and	O
allows	O
a	O
single	O
computation	O
to	O
be	O
dropped	O
in	O
case	O
of	O
failure	O
.	O
</s>
<s>
Load	B-Application
balancing	I-Application
,	O
however	O
,	O
sometimes	O
uses	O
data	O
replication	O
(	O
especially	O
multi-master	B-Operating_System
replication	I-Operating_System
)	O
internally	O
,	O
to	O
distribute	O
its	O
data	O
among	O
machines	O
.	O
</s>
<s>
Backup	B-Protocol
differs	O
from	O
replication	O
in	O
that	O
the	O
saved	O
copy	O
of	O
data	O
remains	O
unchanged	O
for	O
a	O
long	O
period	O
of	O
time	O
.	O
</s>
<s>
Replication	O
is	O
one	O
of	O
the	O
oldest	O
and	O
most	O
important	O
topics	O
in	O
the	O
overall	O
area	O
of	O
distributed	B-Architecture
systems	I-Architecture
.	O
</s>
<s>
Processes	O
for	O
data	O
replication	O
are	O
passive	O
and	O
operate	O
only	O
to	O
maintain	O
the	O
stored	B-General_Concept
data	I-General_Concept
,	O
reply	O
to	O
read	O
requests	O
and	O
apply	O
updates	O
.	O
</s>
<s>
Computation	O
replication	O
is	O
usually	O
performed	O
to	O
provide	O
fault-tolerance	B-General_Concept
,	O
and	O
take	O
over	O
an	O
operation	O
if	O
one	O
component	O
fails	O
.	O
</s>
<s>
Transactional	O
replication	O
:	O
used	O
for	O
replicating	O
transactional	B-General_Concept
data	I-General_Concept
,	O
such	O
as	O
a	O
database	O
.	O
</s>
<s>
The	O
one-copy	B-Operating_System
serializability	I-Operating_System
model	O
is	O
employed	O
,	O
which	O
defines	O
valid	O
outcomes	O
of	O
a	O
transaction	O
on	O
replicated	O
data	O
in	O
accordance	O
with	O
the	O
overall	O
ACID	O
(	O
atomicity	B-General_Concept
,	O
consistency	O
,	O
isolation	O
,	O
durability	O
)	O
properties	O
that	O
transactional	O
systems	O
seek	O
to	O
guarantee	O
.	O
</s>
<s>
State	B-Operating_System
machine	I-Operating_System
replication	I-Operating_System
:	O
assumes	O
that	O
the	O
replicated	O
process	O
is	O
a	O
deterministic	B-General_Concept
finite	I-General_Concept
automaton	I-General_Concept
and	O
that	O
atomic	B-Operating_System
broadcast	I-Operating_System
of	O
every	O
event	O
is	O
possible	O
.	O
</s>
<s>
It	O
is	O
based	O
on	O
distributed	B-Operating_System
consensus	I-Operating_System
and	O
has	O
a	O
great	O
deal	O
in	O
common	O
with	O
the	O
transactional	O
replication	O
model	O
.	O
</s>
<s>
State	B-Operating_System
machine	I-Operating_System
replication	I-Operating_System
is	O
usually	O
implemented	O
by	O
a	O
replicated	O
log	O
consisting	O
of	O
multiple	O
subsequent	O
rounds	O
of	O
the	O
Paxos	B-Operating_System
algorithm	I-Operating_System
.	O
</s>
<s>
This	O
was	O
popularized	O
by	O
Google	O
's	O
Chubby	B-Operating_System
system	O
,	O
and	O
is	O
the	O
core	O
behind	O
the	O
open-source	O
Keyspace	B-Application
data	I-Application
store	I-Application
.	O
</s>
<s>
Database	B-General_Concept
replication	I-General_Concept
can	O
be	O
used	O
on	O
many	O
database	B-Application
management	I-Application
systems	I-Application
(	O
DBMS	O
)	O
,	O
usually	O
with	O
a	O
primary/replica	B-Operating_System
relationship	O
between	O
the	O
original	O
and	O
the	O
copies	O
.	O
</s>
<s>
In	O
multi-master	B-Operating_System
replication	I-Operating_System
,	O
updates	O
can	O
be	O
submitted	O
to	O
any	O
database	O
node	O
,	O
and	O
then	O
ripple	O
through	O
to	O
other	O
servers	O
.	O
</s>
<s>
The	O
most	O
common	O
challenge	O
that	O
exists	O
in	O
multi-master	B-Operating_System
replication	I-Operating_System
is	O
transactional	O
conflict	O
prevention	O
or	O
resolution	O
.	O
</s>
<s>
Most	O
synchronous	O
(	O
or	O
eager	O
)	O
replication	O
solutions	O
perform	O
conflict	O
prevention	O
,	O
while	O
asynchronous	B-Architecture
(	O
or	O
lazy	O
)	O
solutions	O
have	O
to	O
perform	O
conflict	O
resolution	O
.	O
</s>
<s>
For	O
instance	O
,	O
if	O
the	O
same	O
record	O
is	O
changed	O
on	O
two	O
nodes	O
simultaneously	O
,	O
an	O
eager	O
replication	O
system	O
would	O
detect	O
the	O
conflict	O
before	O
confirming	O
the	O
commit	O
and	O
abort	O
one	O
of	O
the	O
transactions	B-General_Concept
.	O
</s>
<s>
A	O
lazy	B-General_Concept
replication	I-General_Concept
system	O
would	O
allow	O
both	O
transactions	B-General_Concept
to	O
commit	O
and	O
run	O
a	O
conflict	O
resolution	O
during	O
re-synchronization	O
.	O
</s>
<s>
Database	B-General_Concept
replication	I-General_Concept
becomes	O
more	O
complex	O
when	O
it	O
scales	O
up	O
horizontally	O
and	O
vertically	O
.	O
</s>
<s>
The	O
early	O
problems	O
of	O
vertical	O
scale-up	O
have	O
largely	O
been	O
addressed	O
by	O
improving	O
Internet	O
reliability	B-Protocol
and	O
performance	O
.	O
</s>
<s>
When	O
data	O
is	O
replicated	O
between	O
database	O
servers	O
,	O
so	O
that	O
the	O
information	O
remains	O
consistent	O
throughout	O
the	O
database	B-Application
system	I-Application
and	O
users	O
cannot	O
tell	O
or	O
even	O
know	O
which	O
server	O
in	O
the	O
DBMS	O
they	O
are	O
using	O
,	O
the	O
system	O
is	O
said	O
to	O
exhibit	O
replication	O
transparency	B-Operating_System
.	O
</s>
<s>
However	O
,	O
replication	O
transparency	B-Operating_System
can	O
not	O
always	O
be	O
achieved	O
.	O
</s>
<s>
When	O
data	O
is	O
replicated	O
in	O
a	O
database	O
,	O
they	O
will	O
be	O
constrained	O
by	O
CAP	B-Operating_System
theorem	I-Operating_System
or	O
PACELC	B-Operating_System
theorem	I-Operating_System
.	O
</s>
<s>
Various	O
data	B-General_Concept
consistency	I-General_Concept
models	I-General_Concept
have	O
also	O
been	O
developed	O
to	O
serve	O
as	O
Service	O
Level	O
Agreement	O
(	O
SLA	O
)	O
between	O
service	O
providers	O
and	O
the	O
users	O
.	O
</s>
<s>
Active	O
(	O
real-time	O
)	O
storage	O
replication	O
is	O
usually	O
implemented	O
by	O
distributing	O
updates	O
of	O
a	O
block	O
device	O
to	O
several	O
physical	O
hard	B-Device
disks	I-Device
.	O
</s>
<s>
This	O
way	O
,	O
any	O
file	B-Application
system	I-Application
supported	O
by	O
the	O
operating	B-General_Concept
system	I-General_Concept
can	O
be	O
replicated	O
without	O
modification	O
,	O
as	O
the	O
file	B-Application
system	I-Application
code	O
works	O
on	O
a	O
level	O
above	O
the	O
block	O
device	B-Application
driver	I-Application
layer	O
.	O
</s>
<s>
It	O
is	O
implemented	O
either	O
in	O
hardware	B-Architecture
(	O
in	O
a	O
disk	B-Device
array	I-Device
controller	I-Device
)	O
or	O
in	O
software	O
(	O
in	O
a	O
device	B-Application
driver	I-Application
)	O
.	O
</s>
<s>
The	O
most	O
basic	O
method	O
is	O
disk	B-General_Concept
mirroring	I-General_Concept
,	O
which	O
is	O
typical	O
for	O
locally	O
connected	O
disks	O
.	O
</s>
<s>
A	O
replication	O
is	O
extendable	O
across	O
a	O
computer	B-Architecture
network	I-Architecture
,	O
so	O
that	O
the	O
disks	O
can	O
be	O
located	O
in	O
physically	O
distant	O
locations	O
,	O
and	O
the	O
primary/replica	B-Operating_System
database	B-General_Concept
replication	I-General_Concept
model	O
is	O
usually	O
applied	O
.	O
</s>
<s>
The	O
main	O
characteristic	O
of	O
such	O
cross-site	O
replication	O
is	O
how	O
write	O
operations	O
are	O
handled	O
,	O
through	O
either	O
asynchronous	B-Architecture
or	O
synchronous	O
replication	O
;	O
synchronous	O
replication	O
needs	O
to	O
wait	O
for	O
the	O
destination	O
server	O
's	O
response	O
in	O
any	O
write	O
operation	O
whereas	O
asynchronous	B-Architecture
replication	O
does	O
not	O
.	O
</s>
<s>
Synchronous	O
replication	O
guarantees	O
"	O
zero	O
data	O
loss	O
"	O
by	O
the	O
means	O
of	O
atomic	B-General_Concept
write	O
operations	O
,	O
where	O
the	O
write	O
operation	O
is	O
not	O
considered	O
complete	O
until	O
acknowledged	O
by	O
both	O
the	O
local	O
and	O
remote	O
storage	O
.	O
</s>
<s>
In	O
asynchronous	B-Architecture
replication	O
,	O
the	O
write	O
operation	O
is	O
considered	O
complete	O
as	O
soon	O
as	O
local	O
storage	O
acknowledges	O
it	O
.	O
</s>
<s>
The	O
actual	O
remote	O
write	O
is	O
performed	O
asynchronously	O
,	O
resulting	O
in	O
better	O
performance	O
but	O
remote	O
storage	O
will	O
lag	O
behind	O
the	O
local	O
storage	O
,	O
so	O
that	O
there	O
is	O
no	O
guarantee	O
of	O
durability	O
(	O
i.e.	O
,	O
seamless	O
transparency	B-Operating_System
)	O
in	O
the	O
case	O
of	O
local	O
storage	O
failure	O
.	O
</s>
<s>
Point-in-time	O
replication	O
produces	O
periodic	O
snapshots	B-Application
which	O
are	O
replicated	O
instead	O
of	O
primary	O
storage	O
.	O
</s>
<s>
Many	O
distributed	O
filesystems	B-Application
use	O
replication	O
to	O
ensure	O
fault	B-General_Concept
tolerance	I-General_Concept
and	O
avoid	O
a	O
single	O
point	O
of	O
failure	O
.	O
</s>
<s>
A	O
kernel	B-Application
driver	I-Application
(	O
specifically	O
a	O
filter	B-Application
driver	I-Application
)	O
can	O
be	O
used	O
to	O
intercept	O
calls	O
to	O
the	O
filesystem	B-Application
functions	O
,	O
capturing	O
any	O
activity	O
as	O
it	O
occurs	O
.	O
</s>
<s>
The	O
kernel	B-Application
driver	I-Application
transmits	O
these	O
commands	O
to	O
another	O
process	O
,	O
generally	O
over	O
a	O
network	O
to	O
a	O
different	O
machine	O
,	O
which	O
will	O
mimic	O
the	O
operations	O
of	O
the	O
source	O
machine	O
.	O
</s>
<s>
Like	O
block-level	O
storage	O
replication	O
,	O
the	O
file-level	O
replication	O
allows	O
both	O
synchronous	O
and	O
asynchronous	B-Architecture
modes	O
.	O
</s>
<s>
For	O
example	O
,	O
temporary	O
files	O
or	O
parts	O
of	O
a	O
filesystem	B-Application
that	O
hold	O
no	O
business	O
value	O
could	O
be	O
excluded	O
.	O
</s>
<s>
Drawbacks	O
of	O
this	O
software-only	O
solution	O
include	O
the	O
requirement	O
for	O
implementation	O
and	O
maintenance	O
on	O
the	O
operating	B-General_Concept
system	I-General_Concept
level	O
,	O
and	O
an	O
increased	O
burden	O
on	O
the	O
machine	O
's	O
processing	O
power	O
.	O
</s>
<s>
Similarly	O
to	O
database	B-General_Concept
transaction	I-General_Concept
logs	O
,	O
many	O
file	B-Application
systems	I-Application
have	O
the	O
ability	O
to	O
journal	B-Application
their	O
activity	O
.	O
</s>
<s>
The	O
journal	B-Application
can	O
be	O
sent	O
to	O
another	O
machine	O
,	O
either	O
periodically	O
or	O
in	O
real	O
time	O
by	O
streaming	O
.	O
</s>
<s>
On	O
the	O
replica	O
side	O
,	O
the	O
journal	B-Application
can	O
be	O
used	O
to	O
play	O
back	O
file	B-Application
system	I-Application
modifications	O
.	O
</s>
<s>
One	O
of	O
the	O
notable	O
implementations	O
is	O
Microsoft	O
's	O
System	B-General_Concept
Center	I-General_Concept
Data	I-General_Concept
Protection	I-General_Concept
Manager	I-General_Concept
(	O
DPM	O
)	O
,	O
released	O
in	O
2005	O
,	O
which	O
performs	O
periodic	O
updates	O
but	O
does	O
not	O
offer	O
real-time	O
replication	O
.	O
</s>
<s>
This	O
is	O
the	O
process	O
of	O
comparing	O
the	O
source	O
and	O
destination	O
file	B-Application
systems	I-Application
and	O
ensuring	O
that	O
the	O
destination	O
matches	O
the	O
source	O
.	O
</s>
<s>
One	O
of	O
the	O
notable	O
implementations	O
is	O
rsync	B-Application
.	O
</s>
<s>
In	O
a	O
paging	B-Architecture
operating	B-General_Concept
system	I-General_Concept
,	O
pages	O
in	O
a	O
paging	B-Architecture
file	I-Architecture
are	O
sometimes	O
replicated	O
within	O
a	O
track	O
to	O
reduce	O
rotational	O
latency	O
.	O
</s>
<s>
Another	O
example	O
of	O
using	O
replication	O
appears	O
in	O
distributed	B-Operating_System
shared	I-Operating_System
memory	I-Operating_System
systems	O
,	O
where	O
many	O
nodes	O
of	O
the	O
system	O
share	O
the	O
same	O
page	B-General_Concept
of	O
memory	O
.	O
</s>
<s>
This	O
usually	O
means	O
that	O
each	O
node	O
has	O
a	O
separate	O
copy	O
(	O
replica	O
)	O
of	O
this	O
page	B-General_Concept
.	O
</s>
<s>
Many	O
classical	O
approaches	O
to	O
replication	O
are	O
based	O
on	O
a	O
primary-backup	O
model	O
where	O
one	O
device	O
or	O
process	O
has	O
unilateral	O
control	O
over	O
one	O
or	O
more	O
other	O
processes	O
or	O
devices	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
primary	O
might	O
perform	O
some	O
computation	O
,	O
streaming	O
a	O
log	O
of	O
updates	O
to	O
a	O
backup	B-Protocol
(	O
standby	O
)	O
process	O
,	O
which	O
can	O
then	O
take	O
over	O
if	O
the	O
primary	O
fails	O
.	O
</s>
<s>
This	O
approach	O
is	O
common	O
for	O
replicating	O
databases	B-Application
,	O
despite	O
the	O
risk	O
that	O
if	O
a	O
portion	O
of	O
the	O
log	O
is	O
lost	O
during	O
a	O
failure	O
,	O
the	O
backup	B-Protocol
might	O
not	O
be	O
in	O
a	O
state	O
identical	O
to	O
the	O
primary	O
,	O
and	O
transactions	B-General_Concept
could	O
then	O
be	O
lost	O
.	O
</s>
<s>
A	O
weakness	O
of	O
primary-backup	O
schemes	O
is	O
that	O
only	O
one	O
is	O
actually	O
performing	O
operations	O
.	O
</s>
<s>
Fault-tolerance	B-General_Concept
is	O
gained	O
,	O
but	O
the	O
identical	O
backup	B-Protocol
system	O
doubles	O
the	O
costs	O
.	O
</s>
<s>
For	O
this	O
reason	O
,	O
starting	O
,	O
the	O
distributed	B-Architecture
systems	I-Architecture
research	O
community	O
began	O
to	O
explore	O
alternative	O
methods	O
of	O
replicating	O
data	O
.	O
</s>
<s>
An	O
outgrowth	O
of	O
this	O
work	O
was	O
the	O
emergence	O
of	O
schemes	O
in	O
which	O
a	O
group	O
of	O
replicas	O
could	O
cooperate	O
,	O
with	O
each	O
process	O
acting	O
as	O
a	O
backup	B-Protocol
while	O
also	O
handling	O
a	O
share	O
of	O
the	O
workload	O
.	O
</s>
<s>
He	O
argued	O
that	O
unless	O
the	O
data	O
splits	O
in	O
some	O
natural	O
way	O
so	O
that	O
the	O
database	O
can	O
be	O
treated	O
as	O
n	O
disjoint	O
sub-databases	O
,	O
concurrency	O
control	O
conflicts	O
will	O
result	O
in	O
seriously	O
degraded	O
performance	O
and	O
the	O
group	O
of	O
replicas	O
will	O
probably	O
slow	O
as	O
a	O
function	O
of	O
n	O
.	O
Gray	O
suggested	O
that	O
the	O
most	O
common	O
approaches	O
are	O
likely	O
to	O
result	O
in	O
degradation	O
that	O
scales	O
as	O
O(n³ )	O
.	O
</s>
<s>
In	O
the	O
1985	O
–	O
1987	O
,	O
the	O
virtual	O
synchrony	O
model	O
was	O
proposed	O
and	O
emerged	O
as	O
a	O
widely	O
adopted	O
standard	O
(	O
it	O
was	O
used	O
in	O
the	O
Isis	O
Toolkit	O
,	O
Horus	O
,	O
Transis	O
,	O
Ensemble	O
,	O
Totem	O
,	O
Spread	B-General_Concept
,	O
C-Ensemble	O
,	O
Phoenix	O
and	O
Quicksilver	O
systems	O
,	O
and	O
is	O
the	O
basis	O
for	O
the	O
CORBA	B-Architecture
fault-tolerant	B-General_Concept
computing	I-General_Concept
standard	O
)	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
Spread	B-General_Concept
Toolkit	I-General_Concept
supports	O
this	O
same	O
virtual	O
synchrony	O
model	O
and	O
can	O
be	O
used	O
to	O
implement	O
a	O
multi-primary	O
replication	O
scheme	O
;	O
it	O
would	O
also	O
be	O
possible	O
to	O
use	O
C-Ensemble	O
or	O
Quicksilver	O
in	O
this	O
manner	O
.	O
</s>
<s>
WANdisco	B-General_Concept
permits	O
active	O
replication	O
where	O
every	O
node	O
on	O
a	O
network	O
is	O
an	O
exact	O
copy	O
or	O
replica	O
and	O
hence	O
every	O
node	O
on	O
the	O
network	O
is	O
active	O
at	O
one	O
time	O
;	O
this	O
scheme	O
is	O
optimized	O
for	O
use	O
in	O
a	O
wide	O
area	O
network	O
(	O
WAN	O
)	O
.	O
</s>
