In the final lab, i must check this
I will simulate a node failure. This is similar to the previous lab, but this time you will shut down two nodes. <But don’t say if is both secondaries or the primary and a secondary
When two of your nodes are unresponsive, you will not be able to connect to the replica set. You will have to connect to the third node, which should be the only healthy node in the cluster.
Which of these readPreferences will allow you to read data from this node?
SecondaryPreferred routes read operations to the secondary members. But if no secondary members are available, the operation then routes to the primary.
Primary read preference routes all read operations to the primary only.
Secondary routes read operations only to the secondary members in the replica set.
nearest outes read operations to the replica set member with the least network latency to the host
primaryPrefered routes read operations to the primary. But if the primary is unavailable, such as during an election or fail-over event, the application can route reads to an available secondary member instead.
I fail 2 times cause i don’t know if i must fail primary and a secondary or both secondaries.
If i kill 2 secondaries… primary is ok… but is not the answer…