Oracle 5.0 Reference Manual page 2618

Table of Contents

Advertisement

Mysqlnd replication and load balancing plugin (mysqlnd_ms)
• Configure one master and one or more slaves.
setup section.
• Use random load balancing policy together with the
• If you do not plan to use the
• Please, make yourself aware of the properties of automatic failover before adding a
• Consider the use of
how it works before you rely on it.
Example 20.258. Enabling the plugin (php.ini)
mysqlnd_ms.enable=1
mysqlnd_ms.config_file=/path/to/mysqlnd_ms_plugin.ini
Example 20.259. Basic plugin configuration (mysqlnd_ms_plugin.ini) for MySQL Replication
{
"myapp": {
"master": {
"master_1": {
"host": "localhost",
"socket": "\/tmp\/mysql57.sock"
}
},
"slave": {
"slave_0": {
"host": "127.0.0.1",
"port": 3308
},
"slave_1": {
"host": "192.168.2.28",
"port": 3306
}
},
"filters": {
"random": {
"sticky": "1"
}
}
}
}
Primary copy with multi primaries (MMM - MySQL Multi Master)
MySQL Replication allows you to create cluster topologies with multiple masters (primaries). Write-
write conflicts are not handled by the replication system. This is no update anywhere setup. Thus, data
must be partitioned manually and clients must redirected in accordance to the partitioning rules. The
recommended setup is equal to the sharding setup below.
Manual sharding, possibly combined with primary copy and multiple primaries
Use SQL hints and the node group filter for clusters that use data partitioning but leave query
redirection to the client. The example configuration shows a multi master setup with two shards.
Example 20.260. Multiple primaries - multi master (php.ini)
mysqlnd_ms.enable=1
service level
API calls, add the
trx_stickiness
to execute transactions on the primary only. Please, read carefully
2598
Server configuration details [2604]
sticky
flag.
master on write
are given in the
flag.
failover
directive.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents