Updated on 2024-08-08 GMT+08:00

Solution Overview

Application Scenarios

This solution helps you create a highly available MongoDB replica set on Huawei Cloud cloud servers. MongoDB is an open-source NoSQL database, where key-value pairs are stored as a document. Each MongoDB replica set contains primary and secondary nodes so that the replica set can recover automatically once a fault occurs.

Solution Architecture

This solution can help you quickly create a MongoDB replica set on Huawei Cloud cloud servers. The solution architecture is illustrated below.
Figure 1 Architecture

This solution will:

  • Create three FlexusX instances, and these instances will be used for deploying one primary node and two secondary nodes for a MongoDB replica set at different AZs.
  • Create a public NAT gateway and configure SNAT rules so that database nodes can access Internet unidirectionally, making O&M easy while ensuring database access security.

Advantages

  • High availability

    Cloud servers can be deployed across AZs, so a MongoDB replica set deployed on these cloud servers can work in primary/secondary mode to provide disaster recovery and automatic fault recovery.

  • One-click deployment

    You can create cloud servers and deploy a high-availability MongoDB database with just a few clicks.

  • Open source and customization

    This solution is open-source and free for commercial use. You can also make custom development based on source code.

Constraints

  • Before deploying this solution, ensure that you have created a Huawei ID with access to the target region and enabled Huawei Cloud services.
  • If you select the yearly/monthly billing mode, ensure that your account has sufficient balance. If you do not have sufficient balance, you can go to the Billing Center to manually pay for the order.
  • It takes about 2 to 3 minutes to set up a MongoDB replica set. After the replica set is deployed, you can verify this solution by referring to Getting Started.
  • Currently, FlexusX instances can be deployed only in the AP-Bangkok region.