MongoDB replica set promotes SECONDARY to PRIMARY
Background of the incidentThere is a MongoDB replica set in the online environment, because it is deployed in the customer’s local server room, the customer mistakenly deleted the VMs of the other 2 nodes where the replica set is deployed (and the VMs are not recoverable). Fortunately, there is still a node alive, and after logging in to the node, we found that this node is SECONDARY, so some data may be lost, and at this time, we cannot provide read/write service to the application. At this poi ...
MongoDB Single Node Upgrade to Replica Set High Availability Cluster
Project BackgroundDue to historical reasons, we have a business for data synchronization, and MongoDB is using single node in production environment. However, as the business grows, considering the importance of this synchronization business and avoiding business stoppage due to single node failure, we need to upgrade to a replica set to ensure high availability.
Replica set architectureThe following architecture diagram is the MongoDB replica set high availability architecture that needs to be ...