<s>
Redis	B-Operating_System
(	O
;	O
Remote	O
Dictionary	B-Application
Server	O
)	O
is	O
an	O
in-memory	B-General_Concept
data	B-General_Concept
structure	I-General_Concept
store	I-General_Concept
,	O
used	O
as	O
a	O
distributed	B-Operating_System
,	O
in-memory	B-General_Concept
key	B-Data_Structure
–	I-Data_Structure
value	I-Data_Structure
database	I-Data_Structure
,	O
cache	B-General_Concept
and	O
message	B-General_Concept
broker	I-General_Concept
,	O
with	O
optional	O
durability	B-General_Concept
.	O
</s>
<s>
Redis	B-Operating_System
supports	O
different	O
kinds	O
of	O
abstract	O
data	O
structures	O
,	O
such	O
as	O
strings	O
,	O
lists	O
,	O
maps	B-Application
,	O
sets	O
,	O
sorted	O
sets	O
,	O
HyperLogLogs	B-Algorithm
,	O
bitmaps	O
,	O
streams	B-Architecture
,	O
and	O
spatial	O
indices	O
.	O
</s>
<s>
The	O
project	O
was	O
developed	O
and	O
maintained	O
by	O
Salvatore	B-Operating_System
Sanfilippo	I-Operating_System
,	O
starting	O
in	O
2009	O
.	O
</s>
<s>
From	O
2015	O
until	O
2020	O
,	O
he	O
led	O
a	O
project	O
core	O
team	O
sponsored	O
by	O
Redis	B-Operating_System
Labs	O
.	O
</s>
<s>
Salvatore	B-Operating_System
Sanfilippo	I-Operating_System
left	O
Redis	B-Operating_System
as	O
the	O
maintainer	O
in	O
2020	O
.	O
</s>
<s>
It	O
is	O
open-source	B-Application
software	I-Application
released	O
under	O
a	O
BSD	B-Operating_System
3-clause	O
license	O
.	O
</s>
<s>
In	O
2021	O
,	O
not	O
long	O
after	O
the	O
original	O
author	O
and	O
main	O
maintainer	O
left	O
,	O
Redis	B-Operating_System
Labs	O
dropped	O
the	O
Labs	O
from	O
its	O
name	O
and	O
now	O
is	O
known	O
simply	O
as	O
"	O
Redis	B-Operating_System
"	O
.	O
</s>
<s>
The	O
name	O
Redis	B-Operating_System
means	O
Remote	O
Dictionary	B-Application
Server	O
.	O
</s>
<s>
The	O
Redis	B-Operating_System
project	O
began	O
when	O
Salvatore	B-Operating_System
Sanfilippo	I-Operating_System
,	O
nicknamed	O
antirez	O
,	O
the	O
original	O
developer	O
of	O
Redis	B-Operating_System
,	O
was	O
trying	O
to	O
improve	O
the	O
scalability	O
of	O
his	O
Italian	O
startup	O
,	O
developing	O
a	O
real-time	B-General_Concept
web	O
log	O
analyzer	O
.	O
</s>
<s>
After	O
encountering	O
significant	O
problems	O
in	O
scaling	O
some	O
types	O
of	O
workloads	O
using	O
traditional	O
database	O
systems	O
,	O
Sanfilippo	O
began	O
in	O
2009	O
to	O
prototype	O
a	O
first	O
proof	O
of	O
concept	O
version	O
of	O
Redis	B-Operating_System
in	O
Tcl	B-Operating_System
.	O
</s>
<s>
Later	O
Sanfilippo	O
translated	O
that	O
prototype	O
to	O
the	O
C	B-Language
language	I-Language
and	O
implemented	O
the	O
first	O
data	O
type	O
,	O
the	O
list	O
.	O
</s>
<s>
After	O
a	O
few	O
weeks	O
of	O
using	O
the	O
project	O
internally	O
with	O
success	O
,	O
Sanfilippo	O
decided	O
to	O
open	O
source	O
it	O
,	O
announcing	O
the	O
project	O
on	O
Hacker	B-Application
News	I-Application
.	O
</s>
<s>
The	O
project	O
began	O
to	O
get	O
traction	O
,	O
particularly	O
among	O
the	O
Ruby	B-Language
community	O
,	O
with	O
GitHub	B-Application
and	O
Instagram	B-Application
being	O
among	O
the	O
first	O
companies	O
adopting	O
it	O
.	O
</s>
<s>
In	O
May	O
,	O
2013	O
,	O
Redis	B-Operating_System
was	O
sponsored	O
by	O
Pivotal	O
Software	O
(	O
a	O
VMware	O
spin-off	O
)	O
.	O
</s>
<s>
In	O
June	O
2015	O
,	O
development	O
became	O
sponsored	O
by	O
Redis	B-Operating_System
Labs	O
.	O
</s>
<s>
In	O
October	O
2018	O
,	O
Redis	B-Operating_System
5.0	O
was	O
released	O
,	O
introducing	O
Redis	B-Operating_System
Stream	B-Architecture
–	O
a	O
new	O
data	O
structure	O
that	O
allows	O
storage	O
of	O
multiple	O
fields	O
and	O
string	O
values	O
with	O
an	O
automatic	O
,	O
time-based	O
sequence	O
at	O
a	O
single	O
key	O
.	O
</s>
<s>
In	O
June	O
2020	O
,	O
Salvatore	B-Operating_System
Sanfilippo	I-Operating_System
stepped	O
down	O
as	O
Redis	B-Operating_System
maintainer	O
.	O
</s>
<s>
Redis	B-Operating_System
popularized	O
the	O
idea	O
of	O
a	O
system	O
that	O
can	O
be	O
considered	O
a	O
store	O
and	O
a	O
cache	B-General_Concept
at	O
the	O
same	O
time	O
.	O
</s>
<s>
Redis	B-Operating_System
also	O
provides	O
a	O
data	O
model	O
that	O
is	O
very	O
unusual	O
compared	O
to	O
a	O
relational	B-Application
database	I-Application
management	I-Application
system	I-Application
(	O
RDBMS	O
)	O
.	O
</s>
<s>
The	O
Redis	B-Operating_System
implementation	O
makes	O
heavy	O
use	O
of	O
the	O
fork	B-Language
system	O
call	O
,	O
to	O
duplicate	O
the	O
process	O
holding	O
the	O
data	O
,	O
so	O
that	O
the	O
parent	O
process	O
continues	O
to	O
serve	O
clients	O
while	O
the	O
child	O
process	O
creates	O
an	O
in-memory	B-General_Concept
copy	O
of	O
the	O
data	O
on	O
disk	O
.	O
</s>
<s>
According	O
to	O
monthly	O
DB-Engines	B-Application
rankings	I-Application
,	O
Redis	B-Operating_System
is	O
often	O
the	O
most	O
popular	O
key	B-Data_Structure
–	I-Data_Structure
value	I-Data_Structure
database	I-Data_Structure
.	O
</s>
<s>
Redis	B-Operating_System
has	O
also	O
been	O
ranked	O
the	O
#4	O
NoSQL	B-General_Concept
database	O
in	O
user	O
satisfaction	O
and	O
market	O
presence	O
based	O
on	O
user	O
reviews	O
,	O
the	O
most	O
popular	O
NoSQL	B-General_Concept
database	O
in	O
containers	O
,	O
and	O
the	O
#4	O
Data	B-General_Concept
store	I-General_Concept
of	O
2019	O
by	O
ranking	O
website	O
stackshare.io	O
.	O
</s>
<s>
It	O
was	O
voted	O
most	O
loved	O
database	O
in	O
the	O
Stack	B-Error_Name
Overflow	I-Error_Name
in	O
2017	O
,	O
2018	O
,	O
2019	O
,	O
2020	O
and	O
2021	O
.	O
</s>
<s>
Since	O
version	O
2.6	O
,	O
Redis	B-Operating_System
features	O
server-side	B-Application
scripting	O
in	O
the	O
language	O
Lua	B-Language
.	O
</s>
<s>
Many	O
programming	O
languages	O
have	O
Redis	B-Operating_System
language	B-Application
bindings	I-Application
on	O
the	O
client	O
side	O
,	O
including	O
:	O
ActionScript	B-Operating_System
,	O
C	B-Language
,	O
C++	B-Language
,	O
C#	B-Application
,	O
Chicken	B-Language
,	O
Clojure	B-Language
,	O
Common	B-Language
Lisp	I-Language
,	O
Crystal	B-Application
,	O
D	B-Application
,	O
Dart	B-Language
,	O
Delphi	B-Language
,	O
Elixir	B-Language
,	O
Erlang	B-Operating_System
,	O
Go	B-Application
,	O
Haskell	B-Language
,	O
Haxe	B-Language
,	O
Io	B-Application
,	O
Java	B-Language
,	O
Nim	B-Application
,	O
JavaScript	O
(	O
Node.js	B-Language
)	O
,	O
Julia	B-Application
,	O
Lua	B-Language
,	O
Objective-C	B-Language
,	O
OCaml	B-Language
,	O
Perl	B-Language
,	O
PHP	B-Application
,	O
Pure	B-Language
Data	I-Language
,	O
Python	B-Language
,	O
R	B-Language
,	O
Racket	B-Operating_System
,	O
Ruby	B-Language
,	O
Rust	B-Application
,	O
Scala	B-Application
,	O
Smalltalk	B-Application
,	O
Swift	B-Application
,	O
and	O
Tcl	B-Operating_System
.	O
</s>
<s>
Redis	B-Operating_System
maps	B-Application
keys	O
to	O
types	O
of	O
values	O
.	O
</s>
<s>
An	O
important	O
difference	O
between	O
Redis	B-Operating_System
and	O
other	O
structured	B-General_Concept
storage	I-General_Concept
systems	O
is	O
that	O
Redis	B-Operating_System
supports	O
not	O
only	O
strings	O
,	O
but	O
also	O
abstract	O
data	O
types	O
:	O
</s>
<s>
HyperLogLogs	B-Algorithm
used	O
for	O
approximated	O
set	O
cardinality	O
size	O
estimation	O
,	O
available	O
since	O
Redis	B-Operating_System
2.8.9	O
in	O
April	O
2014	O
.	O
</s>
<s>
Geospatial	O
data	O
through	O
the	O
implementation	O
of	O
the	O
geohash	O
technique	O
,	O
available	O
since	O
Redis	B-Operating_System
3.2	O
.	O
</s>
<s>
Redis	B-Operating_System
supports	O
high-level	O
,	O
atomic	O
,	O
server-side	B-Application
operations	O
like	O
intersection	O
,	O
union	O
,	O
and	O
difference	O
between	O
sets	O
and	O
sorting	O
of	O
lists	O
,	O
sets	O
and	O
sorted	O
sets	O
.	O
</s>
<s>
More	O
data	O
types	O
are	O
supported	O
based	O
on	O
Redis	B-Operating_System
Modules	O
API	O
:	O
</s>
<s>
JSON	B-General_Concept
–	O
RedisJSON	O
implements	O
ECMA-404	B-General_Concept
(	O
the	O
JavaScript	B-General_Concept
Object	I-General_Concept
Notation	I-General_Concept
Data	O
Interchange	O
Standard	O
)	O
as	O
a	O
native	O
data	O
type	O
.	O
</s>
<s>
Redis	B-Operating_System
typically	O
holds	O
the	O
whole	O
dataset	O
in	O
memory	O
.	O
</s>
<s>
Persistence	B-Application
in	O
Redis	B-Operating_System
can	O
be	O
achieved	O
through	O
two	O
different	O
methods	O
.	O
</s>
<s>
First	O
by	O
snapshotting	O
,	O
where	O
the	O
dataset	O
is	O
asynchronously	O
transferred	O
from	O
memory	O
to	O
disk	O
at	O
regular	O
intervals	O
as	O
a	O
binary	O
dump	O
,	O
using	O
the	O
Redis	B-Operating_System
RDB	O
Dump	O
File	O
Format	O
.	O
</s>
<s>
Alternatively	O
by	O
journaling	B-General_Concept
,	O
where	O
a	O
record	O
of	O
each	O
operation	O
that	O
modifies	O
the	O
dataset	O
is	O
added	O
to	O
an	O
append-only	O
file	O
(	O
AOF	O
)	O
in	O
a	O
background	O
process	O
.	O
</s>
<s>
Redis	B-Operating_System
can	O
rewrite	O
the	O
append-only	O
file	O
in	O
the	O
background	O
to	O
avoid	O
an	O
indefinite	O
growth	O
of	O
the	O
journal	O
.	O
</s>
<s>
Journaling	B-General_Concept
was	O
introduced	O
in	O
version	O
1.1	O
and	O
is	O
generally	O
considered	O
the	O
safer	O
approach	O
.	O
</s>
<s>
By	O
default	O
,	O
Redis	B-Operating_System
writes	O
data	O
to	O
a	O
file	O
system	O
at	O
least	O
every	O
2	O
seconds	O
,	O
with	O
more	O
or	O
less	O
robust	O
options	O
available	O
if	O
needed	O
.	O
</s>
<s>
Redis	B-Operating_System
supports	O
master	B-Architecture
–	I-Architecture
replica	I-Architecture
replication	I-Architecture
.	O
</s>
<s>
Data	O
from	O
any	O
Redis	B-Operating_System
server	O
can	O
replicate	O
to	O
any	O
number	O
of	O
replicas	B-Architecture
.	O
</s>
<s>
A	O
replica	B-Architecture
may	O
be	O
a	O
master	O
to	O
another	O
replica	B-Architecture
.	O
</s>
<s>
This	O
allows	O
Redis	B-Operating_System
to	O
implement	O
a	O
single-rooted	O
replication	B-Architecture
tree	O
.	O
</s>
<s>
Redis	B-Operating_System
replicas	B-Architecture
can	O
be	O
configured	O
to	O
accept	O
writes	O
,	O
permitting	O
intentional	O
and	O
unintentional	O
inconsistency	O
between	O
instances	O
.	O
</s>
<s>
The	O
publish	B-Operating_System
–	I-Operating_System
subscribe	I-Operating_System
feature	O
is	O
fully	O
implemented	O
,	O
so	O
a	O
client	O
of	O
a	O
replica	B-Architecture
may	O
subscribe	O
to	O
a	O
channel	O
and	O
receive	O
a	O
full	O
feed	O
of	O
messages	O
published	O
to	O
the	O
master	O
,	O
anywhere	O
up	O
the	O
replication	B-Architecture
tree	O
.	O
</s>
<s>
Replication	B-Architecture
is	O
useful	O
for	O
read	O
(	O
but	O
not	O
write	O
)	O
scalability	O
or	O
data	B-Architecture
redundancy	I-Architecture
.	O
</s>
<s>
When	O
the	O
durability	B-General_Concept
of	O
data	O
is	O
not	O
needed	O
,	O
the	O
in-memory	B-General_Concept
nature	O
of	O
Redis	B-Operating_System
allows	O
it	O
to	O
perform	O
well	O
compared	O
to	O
database	O
systems	O
that	O
write	O
every	O
change	O
to	O
disk	O
before	O
considering	O
a	O
transaction	O
committed	O
.	O
</s>
<s>
Redis	B-Operating_System
operates	O
as	O
a	O
single	O
process	O
and	O
is	O
single-threaded	O
or	O
double-threaded	O
when	O
it	O
rewrites	O
the	O
AOF	O
(	O
append-only	O
file	O
)	O
.	O
</s>
<s>
Thus	O
,	O
a	O
single	O
Redis	B-Operating_System
instance	O
cannot	O
use	O
parallel	O
execution	O
of	O
tasks	O
such	O
as	O
stored	B-General_Concept
procedures	I-General_Concept
.	O
</s>
<s>
Redis	B-Operating_System
introduced	O
clustering	O
in	O
April	O
2015	O
with	O
the	O
release	O
of	O
version	O
3.0	O
.	O
</s>
<s>
The	O
cluster	B-Architecture
specification	O
implements	O
a	O
subset	O
of	O
Redis	B-Operating_System
commands	O
:	O
all	O
single-key	O
commands	O
are	O
available	O
,	O
multi-key	O
operations	O
(	O
commands	O
related	O
to	O
unions	O
and	O
intersections	O
)	O
are	O
restricted	O
to	O
keys	O
belonging	O
to	O
the	O
same	O
node	O
,	O
and	O
commands	O
related	O
to	O
database	O
selection	O
operations	O
are	O
unavailable	O
.	O
</s>
<s>
A	O
Redis	B-Operating_System
cluster	B-Architecture
can	O
scale	O
up	O
to	O
1,000	O
nodes	O
,	O
achieve	O
"	O
acceptable	O
"	O
write	O
safety	O
and	O
to	O
continue	O
operations	O
when	O
some	O
nodes	O
fail	O
.	O
</s>
<s>
Due	O
to	O
the	O
nature	O
of	O
the	O
database	O
design	O
,	O
typical	O
use	O
cases	O
are	O
session	O
caching	B-General_Concept
,	O
full	O
page	O
cache	B-General_Concept
,	O
message	O
queue	O
applications	O
,	O
leaderboards	O
and	O
counting	O
among	O
others	O
.	O
</s>
<s>
The	O
publish	B-Operating_System
–	I-Operating_System
subscribe	I-Operating_System
messaging	O
paradigm	O
allows	O
real-time	B-General_Concept
communication	O
between	O
servers	O
.	O
</s>
<s>
Large	O
companies	O
such	O
as	O
Twitter	O
are	O
using	O
Redis	B-Operating_System
,	O
Amazon	B-Application
Web	I-Application
Services	I-Application
offers	O
a	O
managed	O
Redis	B-Operating_System
service	O
called	O
ElastiCache	B-General_Concept
for	O
Redis	B-Operating_System
,	O
Google	B-General_Concept
offers	O
a	O
managed	O
Redis	B-Operating_System
service	O
called	O
Cloud	O
Memorystore	O
,	O
Microsoft	O
offers	O
Azure	B-Application
Cache	B-General_Concept
for	O
Redis	B-Operating_System
in	O
Azure	B-Application
,	O
and	O
Alibaba	O
offers	O
ApsaraDB	O
for	O
Redis	B-Operating_System
in	O
Alibaba	B-General_Concept
Cloud	I-General_Concept
.	O
</s>
