<s>
MongoDB	B-Application
is	O
a	O
source-available	B-License
cross-platform	B-Operating_System
document-oriented	B-General_Concept
database	I-General_Concept
program	O
.	O
</s>
<s>
Classified	O
as	O
a	O
NoSQL	B-General_Concept
database	O
program	O
,	O
MongoDB	B-Application
uses	O
JSON-like	O
documents	O
with	O
optional	O
schemas	B-Application
.	O
</s>
<s>
MongoDB	B-Application
is	O
developed	O
by	O
MongoDB	B-General_Concept
Inc	I-General_Concept
.	I-General_Concept
and	O
licensed	O
under	O
the	O
Server	O
Side	O
Public	O
License	O
(	O
SSPL	O
)	O
which	O
is	O
deemed	O
non-free	O
by	O
several	O
distributions	O
.	O
</s>
<s>
MongoDB	B-Application
is	O
a	O
member	O
of	O
the	O
MACH	O
Alliance	O
.	O
</s>
<s>
10gen	B-General_Concept
software	O
company	O
began	O
developing	O
MongoDB	B-Application
in	O
2007	O
as	O
a	O
component	O
of	O
a	O
planned	O
platform	B-Application
as	I-Application
a	I-Application
service	I-Application
product	O
.	O
</s>
<s>
In	O
2013	O
,	O
10gen	B-General_Concept
changed	O
its	O
name	O
to	O
MongoDB	B-General_Concept
Inc	I-General_Concept
.	I-General_Concept
</s>
<s>
On	O
October	O
20	O
,	O
2017	O
,	O
MongoDB	B-Application
became	O
a	O
publicly	O
traded	O
company	O
,	O
listed	O
on	O
NASDAQ	O
as	O
MDB	O
with	O
an	O
IPO	O
price	O
of	O
$24	O
per	O
share	O
.	O
</s>
<s>
MongoDB	B-Application
is	O
a	O
global	O
company	O
with	O
US	O
headquarters	O
in	O
New	O
York	O
City	O
,	O
USA	O
and	O
International	O
headquarters	O
in	O
Dublin	O
,	O
Ireland	O
.	O
</s>
<s>
On	O
October	O
30	O
,	O
2019	O
,	O
MongoDB	B-Application
teamed	O
up	O
with	O
Alibaba	B-General_Concept
Cloud	I-General_Concept
,	O
who	O
will	O
offer	O
its	O
customers	O
a	O
MongoDB-as-a-service	O
solution	O
.	O
</s>
<s>
MongoDB	B-Application
supports	O
field	O
,	O
range	B-General_Concept
query	I-General_Concept
,	O
and	O
regular-expression	B-Language
searches	O
.	O
</s>
<s>
Queries	O
can	O
return	O
specific	O
fields	O
of	O
documents	O
and	O
also	O
include	O
user-defined	O
JavaScript	B-Language
functions	O
.	O
</s>
<s>
Fields	O
in	O
a	O
MongoDB	B-Application
document	O
can	O
be	O
indexed	O
with	O
primary	O
and	O
secondary	O
indices	O
or	O
index	O
.	O
</s>
<s>
MongoDB	B-Application
provides	O
high	O
availability	O
with	O
replica	O
sets	O
.	O
</s>
<s>
If	O
the	O
replicated	O
MongoDB	B-Application
deployment	O
only	O
has	O
a	O
single	O
secondary	O
member	O
,	O
a	O
separate	O
daemon	B-Operating_System
called	O
an	O
arbiter	O
must	O
be	O
added	O
to	O
the	O
set	O
.	O
</s>
<s>
As	O
a	O
consequence	O
,	O
an	O
idealized	O
distributed	O
MongoDB	B-Application
deployment	O
requires	O
at	O
least	O
three	O
separate	O
servers	O
,	O
even	O
in	O
the	O
case	O
of	O
just	O
one	O
primary	O
and	O
one	O
secondary	O
.	O
</s>
<s>
MongoDB	B-Application
scales	O
horizontally	O
using	O
sharding	B-General_Concept
.	O
</s>
<s>
The	O
user	O
chooses	O
a	O
shard	B-General_Concept
key	O
,	O
which	O
determines	O
how	O
the	O
data	O
in	O
a	O
collection	O
will	O
be	O
distributed	O
.	O
</s>
<s>
The	O
data	O
is	O
split	O
into	O
ranges	O
(	O
based	O
on	O
the	O
shard	B-General_Concept
key	O
)	O
and	O
distributed	O
across	O
multiple	O
shards	B-General_Concept
.	O
</s>
<s>
(	O
A	O
shard	B-General_Concept
is	O
a	O
master	O
with	O
one	O
or	O
more	O
replicas	O
.	O
)	O
</s>
<s>
Alternatively	O
,	O
the	O
shard	B-General_Concept
key	O
can	O
be	O
hashed	O
to	O
map	O
to	O
a	O
shard	B-General_Concept
–	O
enabling	O
an	O
even	O
data	O
distribution	O
.	O
</s>
<s>
MongoDB	B-Application
can	O
run	O
over	O
multiple	O
servers	O
,	O
balancing	B-Application
the	I-Application
load	I-Application
or	O
duplicating	O
data	O
to	O
keep	O
the	O
system	O
up	O
and	O
running	O
in	O
case	O
of	O
hardware	O
failure	O
.	O
</s>
<s>
MongoDB	B-Application
can	O
be	O
used	O
as	O
a	O
file	B-Application
system	I-Application
,	O
called	O
GridFS	O
,	O
with	O
load	B-Application
balancing	I-Application
and	O
data	O
replication	O
features	O
over	O
multiple	O
machines	O
for	O
storing	O
files	O
.	O
</s>
<s>
This	O
function	O
,	O
called	O
grid	B-Application
file	I-Application
system	I-Application
,	O
is	O
included	O
with	O
MongoDB	B-Application
drivers	O
.	O
</s>
<s>
MongoDB	B-Application
exposes	O
functions	O
for	O
file	O
manipulation	O
and	O
content	O
to	O
developers	O
.	O
</s>
<s>
GridFS	O
can	O
be	O
accessed	O
using	O
mongofiles	O
utility	O
or	O
plugins	O
for	O
Nginx	B-Operating_System
and	O
lighttpd	B-Protocol
.	O
</s>
<s>
MongoDB	B-Application
provides	O
three	O
ways	O
to	O
perform	O
aggregation	O
:	O
the	O
aggregation	O
pipeline	B-Operating_System
,	O
the	O
map-reduce	B-Operating_System
function	O
,	O
and	O
single-purpose	O
aggregation	O
methods	O
.	O
</s>
<s>
Map-reduce	B-Operating_System
can	O
be	O
used	O
for	O
batch	O
processing	O
of	O
data	O
and	O
aggregation	O
operations	O
.	O
</s>
<s>
But	O
according	O
to	O
MongoDB	B-Application
's	O
documentation	O
,	O
the	O
Aggregation	O
Pipeline	B-Operating_System
provides	O
better	O
performance	O
for	O
most	O
aggregation	O
operations	O
.	O
</s>
<s>
The	O
aggregation	O
framework	O
enables	O
users	O
to	O
obtain	O
the	O
kind	O
of	O
results	O
for	O
which	O
the	O
SQL	B-Language
GROUP	O
BY	O
clause	O
is	O
used	O
.	O
</s>
<s>
Aggregation	O
operators	O
can	O
be	O
strung	O
together	O
to	O
form	O
a	O
pipeline	B-Operating_System
–	O
analogous	O
to	O
Unix	B-Operating_System
pipes	I-Operating_System
.	O
</s>
<s>
JavaScript	B-Language
can	O
be	O
used	O
in	O
queries	O
,	O
aggregation	O
functions	O
(	O
such	O
as	O
MapReduce	B-Operating_System
)	O
,	O
and	O
sent	O
directly	O
to	O
the	O
database	O
to	O
be	O
executed	O
.	O
</s>
<s>
MongoDB	B-Application
supports	O
fixed-size	O
collections	O
called	O
capped	O
collections	O
.	O
</s>
<s>
This	O
type	O
of	O
collection	O
maintains	O
insertion	O
order	O
and	O
,	O
once	O
the	O
specified	O
size	O
has	O
been	O
reached	O
,	O
behaves	O
like	O
a	O
circular	B-Data_Structure
queue	I-Data_Structure
.	O
</s>
<s>
MongoDB	B-Application
claims	O
to	O
support	O
multi-document	O
ACID	O
transactions	O
since	O
the	O
4.0	O
release	O
in	O
June	O
2018	O
.	O
</s>
<s>
This	O
claim	O
was	O
found	O
to	O
not	O
be	O
true	O
as	O
MongoDB	B-Application
violates	O
snapshot	B-Operating_System
isolation	I-Operating_System
.	O
</s>
<s>
The	O
MongoDB	B-Application
Community	O
Edition	O
is	O
free	O
and	O
available	O
for	O
Windows	O
,	O
Linux	B-Application
,	O
and	O
macOS	B-Operating_System
.	O
</s>
<s>
MongoDB	B-Application
Enterprise	O
Server	O
is	O
the	O
commercial	O
edition	O
of	O
MongoDB	B-Application
and	O
is	O
available	O
as	O
part	O
of	O
the	O
MongoDB	B-Application
Enterprise	O
Advanced	O
subscription	O
.	O
</s>
<s>
MongoDB	B-Application
is	O
also	O
available	O
as	O
an	O
on-demand	O
fully	O
managed	O
service	O
.	O
</s>
<s>
MongoDB	B-Application
Atlas	O
runs	O
on	O
AWS	O
,	O
Microsoft	O
Azure	O
,	O
and	O
Google	O
Cloud	O
Platform	O
.	O
</s>
<s>
On	O
March	O
10	O
,	O
2022	O
,	O
MongoDB	B-Application
warned	O
its	O
users	O
in	O
Russia	O
and	O
Belarus	O
that	O
their	O
data	O
stored	O
on	O
the	O
MongoDB	B-Application
Atlas	O
platform	O
will	O
be	O
destroyed	O
due	O
to	O
U.S.	O
sanctions	O
over	O
the	O
war	O
in	O
Ukraine	O
.	O
</s>
<s>
MongoDB	B-Application
has	O
official	O
drivers	O
for	O
major	O
programming	O
languages	O
and	O
development	O
environments	O
.	O
</s>
<s>
Since	O
MongoDB	B-Application
3.2	O
,	O
MongoDB	B-Application
Compass	O
is	O
introduced	O
as	O
the	O
native	O
GUI	O
.	O
</s>
<s>
As	O
of	O
October	O
2018	O
,	O
MongoDB	B-Application
is	O
released	O
under	O
the	O
Server	O
Side	O
Public	O
License	O
(	O
SSPL	O
)	O
,	O
a	O
non-free	O
license	O
developed	O
by	O
the	O
project	O
.	O
</s>
<s>
It	O
replaces	O
the	O
GNU	B-Application
Affero	I-Application
General	I-Application
Public	I-Application
License	I-Application
,	O
and	O
is	O
nearly	O
identical	O
to	O
the	O
GNU	O
General	O
Public	O
License	O
version	O
3	O
,	O
but	O
requires	O
that	O
those	O
making	O
the	O
software	O
publicly	O
available	O
as	O
part	O
of	O
a	O
"	O
service	O
"	O
must	O
make	O
the	O
service	O
's	O
entire	O
source	O
code	O
(	O
insofar	O
that	O
a	O
user	O
would	O
be	O
able	O
to	O
recreate	O
the	O
service	O
themselves	O
)	O
available	O
under	O
this	O
license	O
.	O
</s>
<s>
The	O
language	O
drivers	O
are	O
available	O
under	O
an	O
Apache	B-Application
License	I-Application
.	O
</s>
<s>
In	O
addition	O
,	O
MongoDB	B-General_Concept
Inc	I-General_Concept
.	I-General_Concept
offers	O
proprietary	O
licenses	O
for	O
MongoDB	B-Application
.	O
</s>
<s>
MongoDB	B-Application
has	O
been	O
removed	O
from	O
the	O
Debian	O
,	O
Fedora	O
and	O
Red	O
Hat	O
Enterprise	O
Linux	B-Application
distributions	O
due	O
to	O
the	O
licensing	O
change	O
.	O
</s>
<s>
Due	O
to	O
the	O
default	O
security	O
configuration	O
of	O
MongoDB	B-Application
,	O
allowing	O
anyone	O
to	O
have	O
full	O
access	O
to	O
the	O
database	O
,	O
data	O
from	O
tens	O
of	O
thousands	O
of	O
MongoDB	B-Application
installations	O
has	O
been	O
stolen	O
.	O
</s>
<s>
Furthermore	O
,	O
many	O
MongoDB	B-Application
servers	O
have	O
been	O
held	O
for	O
ransom	O
.	O
</s>
<s>
In	O
September	O
2017	O
;	O
updated	O
January	O
2018	O
,	O
in	O
an	O
official	O
response	O
Davi	O
Ottenheimer	O
,	O
lead	O
Product	O
Security	O
at	O
MongoDB	B-Application
,	O
proclaimed	O
that	O
measures	O
have	O
been	O
taken	O
by	O
MongoDB	B-Application
to	O
defend	O
against	O
these	O
risks	O
.	O
</s>
<s>
From	O
the	O
MongoDB	B-Application
2.6	O
release	O
onwards	O
,	O
the	O
binaries	O
from	O
the	O
official	O
MongoDB	B-Application
RPM	O
and	O
DEB	O
packages	O
bind	O
to	O
localhost	B-Protocol
by	O
default	O
.	O
</s>
<s>
From	O
MongoDB	B-Application
3.6	O
,	O
this	O
default	O
behavior	O
was	O
extended	O
to	O
all	O
MongoDB	B-Application
packages	O
across	O
all	O
platforms	O
.	O
</s>
<s>
In	O
some	O
failure	O
scenarios	O
where	O
an	O
application	O
can	O
access	O
two	O
distinct	O
MongoDB	B-Application
processes	O
,	O
but	O
these	O
processes	O
cannot	O
access	O
each	O
other	O
,	O
it	O
is	O
possible	O
for	O
MongoDB	B-Application
to	O
return	O
stale	O
reads	O
.	O
</s>
<s>
In	O
this	O
scenario	O
it	O
is	O
also	O
possible	O
for	O
MongoDB	B-Application
to	O
roll	O
back	O
writes	O
that	O
have	O
been	O
acknowledged	O
.	O
</s>
<s>
Before	O
version	O
2.2	O
,	O
locks	B-Operating_System
were	O
implemented	O
on	O
a	O
per-server	O
process	O
basis	O
.	O
</s>
<s>
With	O
version	O
2.2	O
,	O
locks	B-Operating_System
were	O
implemented	O
at	O
the	O
database	O
level	O
.	O
</s>
<s>
Since	O
version	O
3.0	O
,	O
pluggable	O
storage	O
engines	O
were	O
introduced	O
,	O
and	O
each	O
storage	O
engine	O
may	O
implement	O
locks	B-Operating_System
differently	O
.	O
</s>
<s>
With	O
MongoDB	B-Application
3.0	O
locks	B-Operating_System
are	O
implemented	O
at	O
the	O
collection	O
level	O
for	O
the	O
MMAPv1	O
storage	O
engine	O
,	O
while	O
the	O
WiredTiger	B-Application
storage	O
engine	O
uses	O
an	O
optimistic	O
concurrency	O
protocol	O
that	O
effectively	O
provides	O
document-level	O
locking	O
.	O
</s>
<s>
Even	O
with	O
versions	O
prior	O
to	O
3.0	O
,	O
one	O
approach	O
to	O
increase	O
concurrency	O
is	O
to	O
use	O
sharding	B-General_Concept
.	O
</s>
<s>
In	O
some	O
situations	O
,	O
reads	O
and	O
writes	O
will	O
yield	O
their	O
locks	B-Operating_System
.	O
</s>
<s>
If	O
MongoDB	B-Application
predicts	O
a	O
page	O
is	O
unlikely	O
to	O
be	O
in	O
memory	O
,	O
operations	O
will	O
yield	O
their	O
lock	O
while	O
the	O
pages	O
load	O
.	O
</s>
<s>
Up	O
until	O
version	O
3.3.11	O
,	O
MongoDB	B-Application
could	O
not	O
do	O
collation-based	O
sorting	O
and	O
was	O
limited	O
to	O
byte-wise	O
comparison	O
via	O
memcmp	O
which	O
would	O
not	O
provide	O
correct	O
ordering	O
for	O
many	O
non-English	O
languages	O
when	O
used	O
with	O
a	O
Unicode	O
encoding	O
.	O
</s>
<s>
Prior	O
to	O
MongoDB	B-Application
4.0	O
,	O
queries	O
against	O
an	O
index	O
were	O
not	O
atomic	O
.	O
</s>
<s>
The	O
introduction	O
of	O
the	O
snapshot	O
read	O
concern	O
in	O
MongoDB	B-Application
4.0	O
eliminated	O
this	O
phenomenon	O
.	O
</s>
<s>
Although	O
MongoDB	B-Application
claims	O
in	O
an	O
undated	O
article	O
entitled	O
"	O
MongoDB	B-Application
and	O
Jepsen	O
"	O
that	O
their	O
database	O
passed	O
Distributed	O
Systems	O
Safety	O
Research	O
company	O
Jepsen	O
's	O
tests	O
,	O
which	O
it	O
called	O
“	O
the	O
industry	O
’s	O
toughest	O
data	O
safety	O
,	O
correctness	O
,	O
and	O
consistency	O
Tests	O
”	O
,	O
Jepsen	O
published	O
an	O
article	O
in	O
May	O
2020	O
stating	O
that	O
MongoDB	B-Application
3.6.4	O
had	O
in	O
fact	O
failed	O
their	O
tests	O
,	O
and	O
that	O
the	O
newer	O
MongoDB	B-Application
4.2.6	O
has	O
more	O
problems	O
including	O
“	O
retrocausal	O
transactions	O
”	O
where	O
a	O
transaction	O
reverses	O
order	O
so	O
that	O
a	O
read	O
can	O
see	O
the	O
result	O
of	O
a	O
future	O
write	O
.	O
</s>
<s>
Jepsen	O
noted	O
in	O
their	O
report	O
that	O
MongoDB	B-Application
omitted	O
any	O
mention	O
of	O
these	O
findings	O
on	O
MongoDB	B-Application
's	O
"	O
MongoDB	B-Application
and	O
Jepsen	O
"	O
page	O
.	O
</s>
<s>
MongoDB	B-General_Concept
Inc	I-General_Concept
.	I-General_Concept
hosts	O
an	O
annual	O
developer	O
conference	O
which	O
has	O
been	O
referred	O
to	O
as	O
either	O
MongoDB	B-Application
World	O
or	O
MongoDB.live	O
.	O
</s>
