Weight values list

When the read weights are automatically set 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.mys2.small Common instances 240 MB 3 100
rds.mys2.mid Common instances 600 MB 5 100
rds.mys2.standard Common instances 1,200 MB 6 400
rds.mys2.large Common instances 2,400 MB 9 400
rds.mys2.xlarge Common instances 6,000 MB 10 800
rds.mys2.2xlarge Common instances 12,000 MB 10 800
rds.mys2.4xlarge Common instances 24,000 MB 12 1,000
rds.mys2.8xlarge Common instances 48,000 MB 13 1,000
rds.mysql.t1.small Common instances 1 GB 1 100
rds.mysql.s1.small Common instances 2 GB 1 100
rds.mysql.s2.large Common instances 4 GB 2 200
rds.mysql.s2.xlarge Common instances 8 GB 2 200
rds.mysql.s3.large Common instances 8 GB 4 400
rds.mysql.m1.medium Common instances 16 GB 4 400
rds.mysql.c1.large Common instances 16 GB 8 800
rds.mysql.c1.xlarge Common instances 32 GB 8 800
rds.mysql.c2.xlarge Common instances 64 GB 16 1,600
rds.mysql.c2.xlp2 Common instances 96 GB 16 1,600
rds.mysql.c2.2xlarge Common instances 128 GB 16 1,600
mysql.x8.medium.2 Dedicated instances 16 GB 2 200
mysql.x8.large.2 Dedicated instances 32 GB 4 400
mysql.x8.xlarge.2 Dedicated instances 64 GB 8 800
mysql.x8.2xlarge.2 Dedicated instances 128 GB 16 1,600
rds.mysql.st.d13 Dedicated-host instances 220 GB 30 3,000
rds.mysql.st.h13 Dedicated-host instances 470 GB 60 6,000

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.

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;