svn: /phpdoc/en/trunk/reference/mysqlnd_ms/ quickstart.xml setup.xml
| From: | Ulf Wendel | Date: | Mon, 11 Feb 2013 13:18:47 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/mysqlnd_ms/ quickstart.xml setup.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-11006@lists.php.net to get a copy of this message | ||
uw Mon, 11 Feb 2013 13:18:47 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=329461
Log:
node_groups filter reference section (stub)
Changed paths:
U phpdoc/en/trunk/reference/mysqlnd_ms/quickstart.xml
U phpdoc/en/trunk/reference/mysqlnd_ms/setup.xml
Modified: phpdoc/en/trunk/reference/mysqlnd_ms/quickstart.xml
===================================================================
--- phpdoc/en/trunk/reference/mysqlnd_ms/quickstart.xml 2013-02-11 13:16:00 UTC (rev 329460)
+++ phpdoc/en/trunk/reference/mysqlnd_ms/quickstart.xml 2013-02-11 13:18:47 UTC (rev 329461)
@@ -1822,11 +1822,11 @@
</para>
<para>
MySQL Replication supports partitioning as filters that allow you to
- create slaves that replicate all or specific databases of the master, or tables.
+ create slaves that replicate all or specific databases of the master, or tables.
It is then in the responsibility of the application
to choose a slave according to the filter rules. You can either use the
- mysqlnd_ms <literal>node_groups</literal> filter to manually support this,
- or use the experimental table filter.
+ mysqlnd_ms <literal><link
linkend="ini.mysqlnd-ms-plugin-config-v2.filter-node-groups">node_groups</link></literal>
+ filter to manually support this, or use the experimental table filter.
</para>
<para>
Manual partitioning or sharding is supported through the
@@ -1924,7 +1924,7 @@
</para>
<para>
By default, the plugin will use all configured master and slave servers for
- query execution. But if a query begins with a SQL hint like
+ query execution. But if a query begins with a SQL hint like
<literal>/*node_group*/</literal>, the plugin will only consider the servers
listed in the <literal>node_group</literal> for query execution. Thus,
<literal>SELECT</literal> queries prefixed with
<literal>/*Partition_A*/</literal>
Modified: phpdoc/en/trunk/reference/mysqlnd_ms/setup.xml
===================================================================
--- phpdoc/en/trunk/reference/mysqlnd_ms/setup.xml 2013-02-11 13:16:00 UTC (rev 329460)
+++ phpdoc/en/trunk/reference/mysqlnd_ms/setup.xml 2013-02-11 13:18:47 UTC (rev 329461)
@@ -1479,6 +1479,117 @@
</para>
</listitem>
</varlistentry>
+
+
+ <varlistentry xml:id="ini.mysqlnd-ms-plugin-config-v2.filter-node-groups">
+ <term>
+ Filter: <parameter>node_groups</parameter>
+ <type>object</type>
+ </term>
+ <listitem>
+ <para>
+ The <literal>node_groups</literal> filter lets you group cluster nodes
+ and query selected groups, for example, to support data partitioning.
+ Data partitioning can be required for manual sharding, primary copy based
+ clusters running multiple masters, or to avoid hot spots in update everywhere
+ clusters that have no built-in partitioning. The filter is a multi filter
+ which returns zero, one or multiple of its input servers. Thus, it
+ must be followed by other filters to reduce the number of candidates
+ down to one for statement execution.
+ </para>
+ <informaltable>
+ <tgroup cols="3">
+ <colspec colwidth="1*"/>
+ <colspec colwidth="7*"/>
+ <colspec colwidth="2*"/>
+ <thead>
+ <row>
+ <entry>Keyword</entry>
+ <entry>Description</entry>
+ <entry>Version</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <literal>user defined node group name</literal>
+ </entry>
+ <entry>
+ <para>
+ One or more node groups must be defined. A node group can have an
+ arbitrary user defined name. The name is used in combination with
+ a SQL hint to restrict query execution to the nodes listed for the
+ node group. To run a query on any of the servers of a node group,
+ the query must begin with the SQL hint
+ <literal>/*user defined node group name*/</literal>.
+ Please note, no white space is allowed around
+ <literal>user defined node group name</literal>. Because
+ <literal>user defined node group name</literal> is used as-is
+ as part of a SQL hint, you should choose the name that is compliant
+ with the SQL language.
+ </para>
+ <para>
+ Each node group entry must contain a list of <literal>master</literal>
+ servers. Additional <literal>slave</literal> servers are allowed.
+ The list of master and slave servers must reference corresponding
+ entries in the
+ <link linkend="ini.mysqlnd-ms-plugin-config-v2.master">global
master</link>
+ respectively <link
linkend="ini.mysqlnd-ms-plugin-config-v2.slave">slave</link>
+ server list.
+ </para>
+ <para>
+ <example>
+ <title>Manual partitioning</title>
+ <programlisting role="ini">
+<![CDATA[
+ {
+ "myapp": {
+ "master": {
+ "master_0": {
+ "host": "localhost",
+ "socket": "\/tmp\/mysql.sock"
+ }
+ },
+ "slave": {
+ "slave_0": {
+ "host": "192.168.2.28",
+ "port": 3306
+ },
+ "slave_1": {
+ "host": "127.0.0.1",
+ "port": 3311
+ }
+ },
+ "filters": {
+ "node_groups": {
+ "Partition_A" : {
+ "master": ["master_0"],
+ "slave": ["slave_0"]
+ }
+ },
+ "roundrobin": []
+ }
+ }
+}
+]]>
+ </programlisting>
+ </example>
+ </para>
+ <para>
+ Please note, if a filter chain
+ generates an empty slave list and the PHP configuration directive
+ <literal>mysqlnd_ms.multi_master=0</literal> is used, the plugin may
+ emit a warning.
+ </para>
+ </entry>
+ <entry>Since 1.5.0.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </listitem>
+ </varlistentry>
+
<varlistentry xml:id="ini.mysqlnd-ms-plugin-config-v2.filter-qos">
<term>
Filter: <parameter>quality_of_service</parameter>