Oracle 5.0 Reference Manual page 2642

Table of Contents

Advertisement

Mysqlnd replication and load balancing plugin (mysqlnd_ms)
Up to and including
failover
1.3.x: string. Since 1.4.0: object.
Keyword
Description
at a lower consistency level after it has done
some critical reads.
Request strong consistency. Only masters will
strong_consistency
be used.
Failover policy. Supported policies:
loop_before_master
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.
Please note, the automatic failover logic is applied when opening
connections only. Once a connection has been opened no
automatic attempts are made to reopen it in case of an error. If,
for example, the server a connection is connected to is shut down
and the user attempts to run a statement on the connection, no
automatic failover will be tried. Instead, an error will be reported.
If using
failover=master
master, if available. Please check the concepts documentation to
learn about potential pitfalls and risks of using failover=master.
Example 20.285. Optional master failover when failing to
connect to slave (PECL/mysqlnd_ms < 1.4.0)
{
"myapp": {
"master": {
"master_0": {
"host": "localhost"
}
},
"slave": {
"slave_0": {
"host": "192.168.78.136",
"port": "3306"
}
},
"failover": "master"
}
}
Since PECL/mysqlnd_ms 1.4.0 the failover configuration keyword
refers to an object.
Example 20.286. New syntax since 1.4.0
{
"myapp": {
"master": {
"master_0": {
"host": "localhost"
}
},
"slave": {
2622
(default), master,
disabled
(Since 1.4.0).
the plugin will implicitly failover to a
Version
Since 1.2.0.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents