Automatic Failover Mechanism

Tailing the oplog on the primary allows for seamless monitoring within a replica set. If a primary node goes down, the system automatically polls other members to confirm the failure. When a majority agree, a new primary is elected, ensuring continuous operation and resilience in the face of failures.