Oracle 5.0 Reference Manual page 2619

Table of Contents

Advertisement

Mysqlnd replication and load balancing plugin (mysqlnd_ms)
mysqlnd_ms.config_file=/path/to/mysqlnd_ms_plugin.ini
mysqlnd_ms.multi_master=1
Example 20.261. Primary copy with multiple primaries and paritioning
{
"myapp": {
"master": {
"master_1": {
"host": "localhost",
"socket": "\/tmp\/mysql57.sock"
}
"master_2": {
"host": "192.168.2.27",
"socket": "3306"
}
},
"slave": {
"slave_1": {
"host": "127.0.0.1",
"port": 3308
},
"slave_2": {
"host": "192.168.2.28",
"port": 3306
}
},
"filters": {
"node_groups": {
"Partition_A" : {
"master": ["master_1"],
"slave": ["slave_1"]
},
"Partition_B" : {
"master": ["master_2"],
"slave": ["slave_2"]
}
},
"roundrobin": []
}
}
}
The plugin can also be used with a loose collection of unrelated shards. For such a cluster, configure
masters only and disable read write splitting. The nodes of such a cluster are called masters in the
plugin configuration as they accept both reads and writes for their partition.
Using synchronous update everywhere clusters such as MySQL Cluster
MySQL Cluster is a synchronous cluster solution. All cluster nodes accept read and write requests. In
the context of the plugin, all nodes shall be considered as masters.
Use the load balancing and fail over features only.
• Disable the plugins
built-in read-write
• Configure masters only.
• Consider random once load balancing strategy, which is the plugins default. If random once is used,
only masters are configured and no SQL hints are used to force using a certain node, no connection
switches will happen for the duration of a web request. Thus, no special handling is required for
transactions. The plugin will pick one master at the beginning of the PHP script and use it until the
script terminates.
splitting.
2599

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents