This topic describes the default read weights allocated to RDS instances of various specifications.
Weight values list
When the read weights are automatically allocated for instances by the system, the values of these weights are fixed, as shown in the following table.
|Specification code||Specification type||Memory||CPU||Weight|
|rds.mysql.t1.small||General-purpose instance||1 GB||1||100|
|rds.mysql.s1.small||General-purpose instance||2 GB||1||100|
|rds.mysql.s2.large||General-purpose instance||4 GB||2||200|
|rds.mysql.s2.xlarge||General-purpose instance||8 GB||2||200|
|rds.mysql.s3.large||General-purpose instance||8 GB||4||400|
|rds.mysql.m1.medium||General-purpose instance||16 GB||4||400|
|rds.mysql.c1.large||General-purpose instance||16 GB||8||800|
|rds.mysql.c1.xlarge||General-purpose instance||32 GB||8||800|
|rds.mysql.c2.xlarge||General-purpose instance||64 GB||16||1600|
|rds.mysql.c2.xlp2||General-purpose instance||96 GB||16||1600|
|rds.mysql.c2.2xlarge||General-purpose instance||128 GB||16||1600|
|mysqlro.x8.medium. 1||Dedicated instance||16 GB||2||200|
|mysqlro.x4.large. 1||Dedicated instance||16 GB||4||200|
|mysqlro.x8.large. 1||Dedicated instance||32 GB||4||400|
|mysqlro.x4.xlarge. 1||Dedicated instance||32 GB||8||400|
|mysqlro.x8.xlarge. 1||Dedicated instance||64 GB||8||800|
|mysqlro.x4.2xlarge. 1||Dedicated instance||64 GB||16||800|
|mysqlro.x8.2xlarge. 1||Dedicated instance||128 GB||16||1600|
|mysqlro.x4.4xlarge. 1||Dedicated instance||128 GB||32||1600|
|rds.mysql.st.d13||Dedicated-host instance||220 GB||30||3000|
|rds.mysql.st.h43||Dedicated-host instance||470 GB||60||6000|
Specify whether a SQL statement is sent to the master instance or a read-only instance by adding a hint
In addition to the weight distribution system of read/write splitting, hints serve as a complementary SQL syntax to specify whether a SQL statement is executed on the master instance or a read-only instance.
Hints supported by RDS read/write splitting are as follows:
/*FORCE_MASTER*/: specifies that a SQL statement is executed on the master instance.
/*FORCE_SLAVE*/: specifies that a SQL statement is executed on a read-only instance.Note When you use the
/*FORCE_SLAVE*/hint in a SQL statement, the SQL statement is routed to the master instance if the read weight of the master instance is not 0.
For example, after a hint is prefixed to the following statement, the statement is always routed to and executed on the master instance regardless of the preset weight:
/*FORCE_MASTER*/ SELECT * FROM table_name;