Adding Read Replicas to a Replica Set Instance
Scenarios
Read replicas enhance read capabilities and reduce load on primary nodes. After a DDS replica set instance is created, you can create read replicas based on service requirements. To connect to a read replica, see Connecting to a Read Replica Using Mongo Shell.
This function is now in OBT. To use it, submit a service ticket.
Constraints
- To use this function, choose Service Tickets > Create Service Ticket to submit a service ticket.
- The version of a replica set instance must be 3.4, 4.0, 4.2, 4.4 or 5.0.
- Nodes cannot be added to an instance that is being backed up.
- An instance cannot be deleted when one or more nodes are being added.
- When read replicas are being added, the DB instance may be intermittently disconnected once or twice for up to 30s each time.
Precautions
- A maximum of five read replicas can be added to a replica set instance.
Procedure
- Log in to the management console.
- Click
in the upper left corner and select a region and a project. - Click
in the upper left corner of the page and choose Databases > Document Database Service. - On the Instances page, click the name of the target replica set instance.
- In the Node Information area on the Basic Information page, click Add Read Replicas. Figure 1 Creating read replicas
- On the Add Read Replicas page, specify Specifications, Node Class, Nodes, Parameter Template, and Delay, and click Next. Figure 2 Creating read replicas
Table 1 Parameter description Parameter
Description
Parameter Template
The parameters that apply to the read replicas of a replica set instance. After a node is created, you can change the parameter template of the node for optimal performance.
- On the displayed page, confirm the node configuration information.
- If you need to modify your settings, click Previous to go back to the page for you to specify details.
- If you do not need to modify your settings, click Submit to add nodes.
- View the results.
- When nodes are being added, the status of the instance is Adding read replicas. The entire process takes about 15 minutes.
- In the Node Information area, view the information about the nodes you added.
- Choose More > View Delay in the Operation column to view the delay of the current node.