Mysqlnd replication and load balancing plugin (
mysqlnd_ms
)
2613
weights can be assigned to reflect differently sized machines, to
prefer co-located slaves which have a low network latency or, to
configure a standby failover server. In the latter case, you may want
to assign the standby server a very low weight in relation to the
other servers. For example, given the configuration above
slave3
will get only some eight percent of the requests in the average. As
long as
slave1
and
slave2
are running, it will be used sparsely,
similar to a standby failover server. Upon failure of
slave1
and
slave2
, the usage of
slave3
increases. Please, check the notes
on failover before using
weight
this way.
Valid weight values range from 1 to 65535.
Unknown arguments are ignored by the filter. No warning or error is
given.
The filter expects one or more servers as input. Outputs one server.
A filter sequence such as
random
,
roundrobin
may cause a
warning and an error message to be set on the connection handle
when executing a statement.
List of filter arguments.
Keyword
Description
Version
sticky
Enables or disabled random once load
balancing policy. See above.
Since 1.2.0.
weight
Assigns a load balancing weight/priority to a
server. Please, see above for a description.
Since 1.4.0.
Filter:
roundrobin
object
If using the
roundrobin
filter, the plugin iterates over the list of
configured slave servers to pick a server for statement execution.
If the plugin reaches the end of the list, it wraps around to the
beginning of the list and picks the first configured slave server.
Example 20.279.
roundrobin
filter
{
"myapp": {
"master": {
"master_0": {
"host": "localhost"
}
},
"slave": {
"slave_0": {
"host": "192.168.78.136",
"port": "3306"
}
},
"filters": [
"roundrobin"
]
}
}
Expects one or more servers as input. Outputs one server. A filter
sequence such as
roundrobin
,
random
may cause a warning
and an error message to be set on the connection handle when
executing a statement.
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...