thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Data & Analytics · Intermediate

Replica Set

A group of MongoDB servers holding the same data, with one primary for writes and secondaries that replicate and can take over automatically.

Definition

Replica sets elect a new primary on failure. Write concern (such as w:'majority') controls durability, and read preference controls whether reads may go to secondaries. An odd number of voting members avoids election ties.

Exam tip

Replica sets provide high availability; sharding provides horizontal scale. Production clusters use both.

Related terms