replication and sharding in mongodb Flashcards

1
Q

replica set

A

has one primary and multiple secondary and all write operations must go to the primary which maintains a log; “oplog”
secondaries periodically read and apply the log from the primary site

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what are some benefits of replica sets

A

allows flexibility availability and load balancing and fault tolerance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what are replica sets based on

A

based on master slave architecture

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

how does writing and reading work in replica sets

A

all writes go to the primary
writes are accepted once the primary accepts the operation in memory
the secondaries are not updated yet
all reads go to the primary ensuring strict consitency

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

how does persistent writing (journaling/logging) work in replica sets

A

a write is only accepted after being written to a log on disk
still on the primary site
accepted data becomes persistent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly