Correct option is C
Replication in MongoDB ensures
data availability and reliability by maintaining multiple copies of the same data across different servers in a replica set. If the primary server fails due to hardware or network issues, one of the secondary servers can automatically take over as the new primary, ensuring uninterrupted access to the data and high availability.
Important Key Points:
1.
Replica Set: MongoDB's replication is implemented through replica sets, which consist of a primary node, secondary nodes, and an optional arbiter.
2.
Failover Mechanism: In case of a primary node failure, a secondary node is automatically elected as the new primary.
3.
Data Redundancy: Replication maintains multiple copies of data, ensuring fault tolerance and recovery options.
Knowledge Booster:
·
Sharding: Used for horizontal scaling of large datasets across multiple servers, improving performance but not directly ensuring availability.
·
Indexing: Optimizes query performance by enabling faster data retrieval but does not provide fault tolerance.
·
Aggregation: Used for processing and analyzing data, enabling complex computations and transformations but unrelated to availability.
·
Caching: Enhances performance by storing frequently accessed data in memory, but it does not address hardware or network failures.