Getting Started
What is MongoDB?
Install / Config
C.R.U.D. Ops
Data Modeling
Database Mgmt
MongoDB Database Management
Replication Overview
What is replication?
.
Copies of the same data on different servers
When would you use replication?
.
Provides redundancy
Safeguards data when a server goes down
What is a
primary
?
.
The
primary
is the
mongod
instance which accepts read and write requests for the data set
What are
secondaries
?
.
Secondaries
store a backup copy of the data set held by the
primary
What happens when a
primary
fails?
.
The
secondaries
elect a new primary
When would you use an
arbiter
.
An
arbiter
is a
mongod
instance which holds no data
Use an
arbiter
if you have an even number of
secondaries
The
arbiter
has "voting rights" to help decide ties
How can "reads" take advantage of replication?
.
Read preference modes which can be set:
primary, primaryPreferred
secondary, secondaryPreferred, nearest
How many MongoDB instances should go into a replica set?
.
A minimum of 3 is recommended:
1 primary and 2 secondaries
There is no upper limit
Objective: redundancy
Geographic considerations may apply
+
o
-