Rules for Distributing Weights
This section describes the rules of distributing read weights to DB instances of different specifications.
Weight Distribution Rules
The default weight equals to the number of vCPUs multiplied by 50. The weight ranges from 100 to 1000.
Specifying Whether a SQL Statement Is Sent to the Primary DB Instance or Read Replica By Adding a Hint
Hints supported by RDS read/write splitting are as follows:
/*FORCE_MASTER*/: A SQL statement is executed on the primary DB instance.
/*FORCE_SLAVE*/: A SQL statement is executed on a read replica.
- In addition to the weight distribution system of read/write splitting, hints are a useful type of SQL syntax that allows you to specify whether a SQL statement is executed on the primary DB instance or on a read replica.
- Hints are only used as routing suggestions. In non-read-only SQL and non-transaction scenarios, SQL statements cannot be routed to read replicas.
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