Mysqlnd replication and load balancing plugin (
mysqlnd_ms
)
2610
Keyword
Description
Version
throttling the client. By throttling the client the
write load on the master is reduced indirectly.
A primary copy based replication system, such
as MySQL Replication, is given more time to
reach a consistent state. This can be desired,
for example, to increase the number of data
copies for high availability considerations or to
prevent the master from being overloaded.
filters
object
List of filters. A filter is responsible to filter the list of available
servers for executing a given statement. Filters can be chained. The
random
and
roundrobin
filter replace the
pick[]
directive used
in prior version to select a load balancing policy. The
user
filter
replaces the
mysqlnd_ms_set_user_pick_server
function.
Filters may accept parameters to refine their actions.
If no load balancing policy is set, the plugin will default to
random_once
. The
random_once
policy picks a random slave
server when running the first read-only statement. The slave
server will be used for all read-only statements until the PHP script
execution ends. No load balancing policy is set and thus, defaulting
takes place, if neither the
random
nor the
roundrobin
are part of
a configuration section.
If a filter chain is configured so that a filter which output no more
than once server is used as input for a filter which should be given
more than one server as input, the plugin may emit a warning upon
opening a connection. The warning may read:
(mysqlnd_ms)
Error while creating filter '%s' . Non-multi
filter '%s' already created. Stopping in %s on
line %d
. Furthermore, an error of the error code
2000
, the sql
state
HY000
and an error message similar to the warning may be
set on the connection handle.
Example 20.274. Invalid filter sequence
{
"myapp": {
"master": {
"master_0": {
"host": "localhost"
}
},
"slave": {
"slave_0": {
"host": "192.168.78.136",
"port": "3306"
}
},
"filters": [
"roundrobin",
"random"
]
}
}
<?php
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 ...