https://oxpedia.org/wiki/index.php?title=Maxscale&feed=atom&action=historyMaxscale - Revision history2024-03-28T14:28:48ZRevision history for this page on the wikiMediaWiki 1.31.0https://oxpedia.org/wiki/index.php?title=Maxscale&diff=23723&oldid=prevDominik.epple: /* Installation */2017-10-18T12:16:49Z<p><span dir="auto"><span class="autocomment">Installation</span></span></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 12:16, 18 October 2017</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l14" >Line 14:</td>
<td colspan="2" class="diff-lineno">Line 14:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Installation ==</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Installation ==</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"> apt-get install curl</del></div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">Follow instructions on </ins>https://mariadb.com/<ins class="diffchange diffchange-inline">kb</ins>/<ins class="diffchange diffchange-inline">en/mariadb-enterprise/maxscale-21-installation</ins>-<ins class="diffchange diffchange-inline">guide/ to </ins>install the <ins class="diffchange diffchange-inline">software on your system.</ins></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"> curl -sS </del>https://<del class="diffchange diffchange-inline">downloads.</del>mariadb.com/<del class="diffchange diffchange-inline">MariaDB</del>/<del class="diffchange diffchange-inline">mariadb_repo_setup > setup.sh</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"> # be paranoid and review the script before executing... it should only modify</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"> # apt repos and call apt</del>-<del class="diffchange diffchange-inline">get update</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"> bash setup.sh</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"> # so now </del>install the <del class="diffchange diffchange-inline">thing</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"> apt-get install maxscale</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Configuration ==</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Configuration ==</div></td></tr>
</table>Dominik.epplehttps://oxpedia.org/wiki/index.php?title=Maxscale&diff=23679&oldid=prevDominik.epple at 14:15, 22 September 20172017-09-22T14:15:48Z<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 14:15, 22 September 2017</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l3" >Line 3:</td>
<td colspan="2" class="diff-lineno">Line 3:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Introduction ==</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Introduction ==</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Since long HAproxy is the standard loadbalancing solution for people who want a simple userspace daemon for MySQL loadbalancing. However with the availability of Maxscale <del class="diffchange diffchange-inline">there is </del>a tool which has been specifically designed to loadbalance for MySQL instances (Galera clusters and/or Master-Slave systems) and offers some attractive features. Performance-wise we have not finished out testing, but first experiments indicate that we do not observe performance regressions from HAproxy to Maxscale.</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Since long HAproxy is the standard <ins class="diffchange diffchange-inline">[[OXLoadBalancingClustering_Database#Loadbalancer_options|</ins>loadbalancing solution<ins class="diffchange diffchange-inline">]] </ins>for people who want a simple userspace daemon for MySQL loadbalancing. However with the availability of <ins class="diffchange diffchange-inline">[https://mariadb.com/kb/en/mariadb-enterprise/maxscale/ </ins>Maxscale<ins class="diffchange diffchange-inline">] we have </ins>a tool which has been specifically designed to loadbalance for MySQL instances (Galera clusters and/or Master-Slave systems) and offers some attractive features. Performance-wise we have not finished out testing, but first experiments indicate that we do not observe performance regressions from HAproxy to Maxscale.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Maxscale comes with built-in MySQL server node status monitoring, thus no external health check service is required, which simplifies the setup <del class="diffchange diffchange-inline">sigificantly</del>.</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Maxscale comes with built-in MySQL server node status monitoring, thus no external health check service is required, which simplifies the setup <ins class="diffchange diffchange-inline">significantly</ins>.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Links:</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Links:</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l40" >Line 40:</td>
<td colspan="2" class="diff-lineno">Line 40:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The <code>Read Service</code> and <code>Write Service</code> are different by their <code>router_options</code> -- effectively we define that for the <code>Read Service</code> all nodes which are <code>synced</code> are available, while for the for the <code>Write Service</code> only the node considered by Maxscale to be the master is being used.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The <code>Read Service</code> and <code>Write Service</code> are different by their <code>router_options</code> -- effectively we define that for the <code>Read Service</code> all nodes which are <code>synced</code> are available, while for the for the <code>Write Service</code> only the node considered by Maxscale to be the master is being used.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>The behavior which node is considered master can be changed by some configuration variables, most notably  <code>root_node_as_master</code> which defines that onle the ''root node'', i.e. the node with <code>wsrep_local_index=0</code> will be used as master node. This setting makes sense multiple distributed Maxscale instances are to be used, since it avoids the otherwise potential danger that different nodes pick different masters. However if you use only one (active) Maxscale instance per target cluster at a time (maybe with some active-passive HA setup), it might be beneficial to not use <code>root_node_as_master</code>, but rather <code>disable_master_failback</code> to reduce the number of master switches / failovers.</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>The behavior which node is considered master can be changed by some configuration variables, most notably  <code>root_node_as_master</code> which defines that onle the ''root node'', i.e. the node with <code>wsrep_local_index=0</code> will be used as master node. This setting makes sense <ins class="diffchange diffchange-inline">if </ins>multiple distributed Maxscale instances are to be used, since it avoids the otherwise potential danger that different nodes pick different masters. However if you use only one (active) Maxscale instance per target cluster at a time (maybe with some active-passive HA setup), it might be beneficial to not use <code>root_node_as_master</code>, but rather <code>disable_master_failback</code> to reduce the number of master switches / failovers.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><pre>[maxscale]</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><pre>[maxscale]</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l140" >Line 140:</td>
<td colspan="2" class="diff-lineno">Line 140:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>socket=default</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>socket=default</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></pre></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></pre></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">== Operations ==</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">Maxscale offers a command line tool <code>maxadmin</code> offering an impressive set of features for operations. </ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">* https://mariadb.com/kb/en/mariadb-enterprise/mariadb-maxscale-21-mariadb-maxscale-administration-tutorial/</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">* https://mariadb.com/kb/en/mariadb-enterprise/mariadb-maxscale-21-maxadmin-admin-interface/</ins></div></td></tr>
</table>Dominik.epplehttps://oxpedia.org/wiki/index.php?title=Maxscale&diff=23678&oldid=prevDominik.epple: Created page with "= MariaDB Maxscale = == Introduction == Since long HAproxy is the standard loadbalancing solution for people who want a simple userspace daemon for MySQL loadbalancing. Howe..."2017-09-22T14:05:15Z<p>Created page with "= MariaDB Maxscale = == Introduction == Since long HAproxy is the standard loadbalancing solution for people who want a simple userspace daemon for MySQL loadbalancing. Howe..."</p>
<p><b>New page</b></p><div>= MariaDB Maxscale =<br />
<br />
== Introduction ==<br />
<br />
Since long HAproxy is the standard loadbalancing solution for people who want a simple userspace daemon for MySQL loadbalancing. However with the availability of Maxscale there is a tool which has been specifically designed to loadbalance for MySQL instances (Galera clusters and/or Master-Slave systems) and offers some attractive features. Performance-wise we have not finished out testing, but first experiments indicate that we do not observe performance regressions from HAproxy to Maxscale.<br />
<br />
Maxscale comes with built-in MySQL server node status monitoring, thus no external health check service is required, which simplifies the setup sigificantly.<br />
<br />
Links:<br />
<br />
* MaxScale documentation on GitHub: https://github.com/mariadb-corporation/MaxScale/blob/2.1/Documentation/Documentation-Contents.md<br />
* Complete list of configuration options: https://github.com/mariadb-corporation/MaxScale/blob/2.1/Documentation/Getting-Started/Configuration-Guide.md<br />
<br />
== Installation ==<br />
<br />
apt-get install curl<br />
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup > setup.sh<br />
# be paranoid and review the script before executing... it should only modify<br />
# apt repos and call apt-get update<br />
bash setup.sh<br />
# so now install the thing<br />
apt-get install maxscale<br />
<br />
== Configuration ==<br />
<br />
Maxscale requires a user for monitoring et al.<br />
<br />
CREATE USER 'maxscale'@'loadbalancer.fqdn' IDENTIFIED BY 'sitpavOfEyt5';<br />
GRANT SELECT on mysql.user TO 'maxscale'@'loadbalancer.fqdn';<br />
GRANT SELECT ON mysql.db TO 'maxscale'@'loadbalancer.fqdn';<br />
GRANT SELECT ON mysql.tables_priv TO 'maxscale'@'loadbalancer.fqdn';<br />
GRANT SHOW DATABASES ON *.* TO 'maxscale'@'loadbalancer.fqdn';<br />
GRANT REPLICATION CLIENT on *.* TO 'maxscale'@'loadbalancer.fqdn';<br />
FLUSH PRIVILEGES;<br />
<br />
The config file we use is given below. Since OX App Suite has its own built-in read/write separation, we don't need Maxscale's ''Read-Write Split'' feature; rather, we configure a Read Service with round-robin semantics, and a Write Service with a persistent active-passive behavior.<br />
<br />
Do not confuse the wording <code>Replication Monitor</code> below with OX's builtin ''Replication Monitor'' (which we disable for fully synchronous Galera). It is just an identifier for the definition of Maxscale's built-in health check which is in this case checking Galera nodes (<code>module=galeramon</code>).<br />
<br />
The <code>Read Service</code> and <code>Write Service</code> are different by their <code>router_options</code> -- effectively we define that for the <code>Read Service</code> all nodes which are <code>synced</code> are available, while for the for the <code>Write Service</code> only the node considered by Maxscale to be the master is being used.<br />
<br />
The behavior which node is considered master can be changed by some configuration variables, most notably <code>root_node_as_master</code> which defines that onle the ''root node'', i.e. the node with <code>wsrep_local_index=0</code> will be used as master node. This setting makes sense multiple distributed Maxscale instances are to be used, since it avoids the otherwise potential danger that different nodes pick different masters. However if you use only one (active) Maxscale instance per target cluster at a time (maybe with some active-passive HA setup), it might be beneficial to not use <code>root_node_as_master</code>, but rather <code>disable_master_failback</code> to reduce the number of master switches / failovers.<br />
<br />
<pre>[maxscale]<br />
threads=4<br />
<br />
# Server definitions<br />
#<br />
# Set the address of the server to the network<br />
# address of a MySQL server.<br />
#<br />
<br />
[db1]<br />
type=server<br />
address=db1.fqdn<br />
port=3306<br />
protocol=MySQLBackend<br />
<br />
[db2]<br />
type=server<br />
address=db2.fqdn<br />
port=3306<br />
protocol=MySQLBackend<br />
<br />
[db3]<br />
type=server<br />
address=db3.fqdn<br />
port=3306<br />
protocol=MySQLBackend<br />
<br />
# Monitor for the servers<br />
#<br />
# This will keep MaxScale aware of the state of the servers.<br />
# MySQL Monitor documentation:<br />
# https://github.com/mariadb-corporation/MaxScale/blob/2.1/Documentation/Monitors/MySQL-Monitor.md<br />
<br />
[Replication Monitor]<br />
type=monitor<br />
module=galeramon<br />
servers=db1, db2, db3<br />
user=maxscale<br />
passwd=sitpavOfEyt5<br />
monitor_interval=10000<br />
<br />
# Service definitions<br />
#<br />
# Service Definition for a read-only service and<br />
# a read/write splitting service.<br />
#<br />
<br />
# ReadConnRoute documentation:<br />
# https://github.com/mariadb-corporation/MaxScale/blob/2.1/Documentation/Routers/ReadConnRoute.md<br />
<br />
[Read Service]<br />
type=service<br />
router=readconnroute<br />
servers=db1, db2, db3<br />
user=maxscale<br />
passwd=sitpavOfEyt5<br />
router_options=synced<br />
<br />
[Write Service]<br />
type=service<br />
router=readconnroute<br />
servers=db1, db2, db3<br />
user=maxscale<br />
passwd=sitpavOfEyt5<br />
router_options=master<br />
<br />
# This service enables the use of the MaxAdmin interface<br />
# MaxScale administration guide:<br />
# https://github.com/mariadb-corporation/MaxScale/blob/2.1/Documentation/Reference/MaxAdmin.md<br />
<br />
[MaxAdmin Service]<br />
type=service<br />
router=cli<br />
<br />
# Listener definitions for the services<br />
#<br />
# These listeners represent the ports the<br />
# services will listen on.<br />
#<br />
<br />
[Read Listener]<br />
type=listener<br />
service=Read Service<br />
protocol=MySQLClient<br />
port=4306<br />
<br />
[Write Listener]<br />
type=listener<br />
service=Write Service<br />
protocol=MySQLClient<br />
port=4307<br />
<br />
[MaxAdmin Listener]<br />
type=listener<br />
service=MaxAdmin Service<br />
protocol=maxscaled<br />
socket=default<br />
</pre></div>Dominik.epple