Home

lastwritewins

Last-write-wins, often abbreviated LWW, is a conflict resolution strategy used in distributed systems and eventually consistent data stores. When multiple replicas concurrently update the same item, the update with the most recent timestamp is treated as authoritative and overwrites earlier versions.

Implementation relies on each write being tagged with a timestamp, typically generated by the client or server.

The approach is simple and fast, offering straightforward conflict resolution and low coordination overhead. It is

LWW is commonly used in Dynamo-style key-value stores and in some Cassandra configurations, where conflict resolution

Overall, last-write-wins is a pragmatic trade-off, favoring speed and simplicity over strict consistency and historical preservation.

During
reconciliation,
replicas
compare
timestamps
and
apply
the
value
with
the
largest
one.
If
two
writes
share
the
same
timestamp,
a
deterministic
tie-breaker
such
as
the
source
node
identifier
or
a
sequence
number
is
used
to
ensure
a
single
outcome.
well-suited
for
latency-sensitive
workloads
and
scenarios
where
recent
updates
should
prevail.
However,
LWW
depends
on
reasonably
synchronized
clocks;
clock
skew,
drift,
or
clock
manipulation
can
lead
to
inconsistent
or
unintuitive
results.
It
can
also
cause
older,
potentially
valid
updates
to
be
lost
when
newer
writes
arrive
late,
and
it
does
not
provide
strong
consistency
guarantees
or
full
historical
auditability.
is
performed
by
choosing
the
value
with
the
latest
timestamp.
In
CRDT
terminology,
LWW
appears
in
constructs
such
as
LWW-Register
and
LWW-Set,
which
use
timestamps
to
decide
membership
or
value.