<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hello,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am looking to improve the database load distribution and one of the things that may help with this is to spread out the reads.<o:p></o:p></p>
<p class="MsoNormal">From the configuration reference it looks like neutron dues support a slave_connection parameter but when I enabled it and enabled query logging on the secondary databases there aren’t any queries being executed on the secondaries. Is there
 anything I am missing ?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Sorry for CC’ing the dev list as well but someone in the dev teams may have an answer from a developer point of view.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">My setup is like this:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Openstack stable/mitaka (built from git)<o:p></o:p></p>
<p class="MsoNormal">3 galera nodes<o:p></o:p></p>
<p class="MsoNormal">1 haproxy running on each node with active/backup with local node as single active configuration for the frontend listening on :3306 and active/backup with the other nodes as active for the frontend listening on :3308<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">In neutron.conf in the [database] section I set up the the connection and slave_connection parameters like this:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">[database]<o:p></o:p></p>
<p class="MsoNormal">connection = mysql+pymysql://neutron:XXXXXXX@neutron-db.service:3306/neutron?charset=utf8<o:p></o:p></p>
<p class="MsoNormal">slave_connection = mysql+pymysql://neutron: XXXXXXX@neutron-db.service:3308/neutron?charset=utf8<o:p></o:p></p>
<p class="MsoNormal">idle_timeout = 1800<o:p></o:p></p>
<p class="MsoNormal">max_retries = -1<o:p></o:p></p>
<p class="MsoNormal">retry_interval = 5<o:p></o:p></p>
<p class="MsoNormal">min_pool_size = 8<o:p></o:p></p>
<p class="MsoNormal">max_pool_size = 32<o:p></o:p></p>
<p class="MsoNormal">max_overflow = 16<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Loooking on a slave it opens a single connection which is eventually closed because of lack of activity.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><br>
Thanks,<o:p></o:p></p>
<p class="MsoNormal">Cristian<o:p></o:p></p>
</div>
<PRE>_________________________________________________________________________________________________________________________

Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.
</PRE></body>
</html>