Oracle 5.0 Reference Manual page 2650

Table of Contents

Advertisement

Mysqlnd replication and load balancing plugin (mysqlnd_ms)
string
slave[]
string
pick[]
string
failover
bool
lazy_connections
Furthermore the plugin may set an error code for the connection
handle such as
HY000/2000
corresponding error message depends on your language settings.
URI of one or more MySQL replication slave servers. The URI
follows the syntax hostname[:port|unix_domain_socket].
The plugin supports using one or more slave servers.
Setting a slave server is mandatory. The plugin will report a
warning upon connect if the user has failed to provide at least one
slave server for a configuration section. The warning may read
(mysqlnd_ms) Cannot find slaves section in
Furthermore the plugin may set an error code for the connection
handle such as
HY000/2000
corresponding error message depends on your language settings.
Load balancing (server picking) policy. Supported policies: random,
(default), roundrobin, user.
random_once
If no load balancing policy is set, the plugin will default to
random_once. The
random_once
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.
The
policy will pick a random server whenever a read-only
random
statement is to be executed.
If using
the plugin iterates over the list of configured
roundrobin
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.
Setting more than one load balancing policy for a configuration
section makes only sense in conjunction with
mysqlnd_ms_set_user_pick_server. If the user defined
callback fails to pick a server, the plugin falls back to the second
configured load balancing policy.
Failover policy. Supported policies:
If no failover policy is set, the plugin will not do any automatic
failover (failover=disabled). Whenever the plugin fails to
connect a server it will emit a warning and set the connections error
code and message. Thereafter it is up to the application to handle
the error and, for example, resent the last statement to trigger the
selection of another server.
If using
failover=master
slave, if available. Please check the concepts documentation to
learn about potential pitfalls and risks of using failover=master.
Controls the use of lazy connections. Lazy connections are
connections which are not opened before the client sends the first
connection.
It is strongly recommended to use lazy connections. Lazy
connections help to keep the number of open connections low.
If you disable lazy connections and, for example, configure one
2630
(CR_UNKNOWN_ERROR). The
(CR_UNKNOWN_ERROR). The
policy picks a random slave
user
(default), master.
disabled
the plugin will implicitly failover to a
config.
and

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents