How Are Read-only Services Split from Read-Write Services
This section describes how to isolate read-only services.
Precautions
- The kernel version must be 2.4.1.2 or later.
- If you want to use read-only groups to handle SQL queries, make sure that the associated data node is available and has available read replicas. If there are no available read replicas, the following error messages may be returned:
- backend database connection error;
- query has been canceled
- execute error: No read-only node
Procedure
- Log in to the DDM console.
- On the Instances page, click the instance where you want to create a node group and click its name.
- In the Node Information area, click Create Group.
- On the displayed page, configure required parameters.
Figure 1 Creating a node group
Table 1 Parameter description Parameter
Description
Group Name
The name must start with a letter and contains only letters, digits, and hyphens (-).
Role
There are two types of groups: read/write and read-only. Each group contains instance nodes with the same role and has a connection address.
VPC
The VPC is the same as the VPC where your instance is deployed, and cannot be changed.
You can specify a subnet for the node group.
Node Class
One node belongs to only one group, and its group cannot be changed once determined. Nodes in the same group must be of the same class.
AZ
Select an AZ.
Quantity
One DDM instance supports multiple read-only groups. Each group contains at least 2 nodes, and each instance contains up to 32 nodes. You can click the plus icon to add nodes.
- Click Next.
- Confirm the configuration and click Submit.
- After the creation is complete, check whether the original Node Information area becomes the Group Information area. Then you can manage nodes in the group.
Figure 2 Group information
- After you create a node group, you can change node class, add or remove nodes, and configure access control.
- After a node group is created for a DDM instance with no groups, existing nodes of the instance are included into another read/write group by default, responsible for handling read/write requests to core services.
- Read traffic to read-only groups is forwarded to read replicas of data nodes by default. There may be noticeable latency because read replica data is asynchronously replicated from primary instances of the data nodes. If the latency exceeds the default or preset threshold, an access error is returned.
- Deleting groups is not supported for yearly/monthly DDM instances.
- To delete a group of a pay-per-use DDM instance, locate the group that you want to delete and click More > Delete Group in the Operation column. The corresponding floating IP address becomes invalid once the group is deleted. This may affect your services. Retain at least one read/write group.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot