1.

How we can enable keyfile authentication on the existing sharded cluster without downtime?

Answer»

MongoDB has replication to provide high availability and redundancy which are the basis for any production database. With replica sets, we can achieve HA as well as DR capability. This also enables up for horizontal scaling enabling the use of commodity servers instead of enterprise servers. With replication, we can prevent downtime even if entire DC goes down with proper configuration.

There are several types of replica members based on the requirement:

  1. Primary: This is the member who accepts all the writes from the application. If the primary goes down, the new primary member is selected which then accepts all writes. MongoDB applies to write operations on the primary and then records the operations on the primary’s OPLOG.
  2. Secondary:  A secondary MAINTAINS a copy of the primary’s data set. To replicate data, a secondary applies operations from the primary’s Oplog to its own data set in an asynchronous process replica set can have one or more secondary’s.
  3. ARBITER: An arbiter is a secondary with a copy of the data, due to which it cannot ever become primary. It PARTICIPATES in the election for primary in case needed. Basically is there to maintain quorum.
  4. Hidden Replica Set Members: A hidden member maintains a copy of the primary’s data set but is invisible to client applications. Hidden members are good for workloads with different usage patterns from the other members in the replica set. They cannot become primary.
  5. Delayed Replica Set Members: Delayed members contain copies of a replica set’s data set. However, a delayed member’s data set reflects an earlier, or delayed, state of the set. They are “rolling backup” or a RUNNING “historical” snapshot of the data set, which may help you recover from various kinds of human error.


Discussion

No Comment Found