Replica set ƙungiya ne ta survinsa MongoDB da suke kiyaye bayyane gida — suna ba da babbar samuwa (sakewa ta atomatik) da famfo. Ɗaya ne ɓangarorin babbar (yana aiki rubuce), waje duk gidajiya (suna karantawa bayyane gida na babbar kuma za su iya yin karatu). Ita ce hanyar mongooDB ta daidaita don aminci.
Tsarin replica set
PRIMARY (1) → receives all WRITES; replicates changes to secondaries
SECONDARIES (2+) → copy the primary's data (via the oplog); can serve READS
ARBITER (optional) → votes in elections but holds no data (for odd vote counts)
Write → Primary → replicated to Secondaries (via the operations log "oplog")
