hi guys,

i've just finished implementing replication on 2 production servers.

i'm using round robin dns to balance the load between the slave & the master.

as you would presume , the master handle all the updates, and 1/2 of the
selects , the slave handle the other 1/2 of the selects.

the selection of the server is made in the php code using regexp matching
"^SELECT" , if one request start by "SELECT" , it is redirected to
select.mydomain.com.

in my dns zone file , i've got two entries for select.mydomain.com , one
for each server.

the problem is that it's quite impossible to fine tune the load between
the servers , and my slave is a bit too busy , so the replication thread
is becoming very slow , and sometimes , i can see that the slave is more
than 2 hours behind the master in terms of replication , and this really
is a pb for me.

i looked everywhere for a "high-priority-updates" option, but i can't find
it.tell me if i'm wrong but i deduced that i can't ask the slave to wait
until it reached the master before answering selects.

so i've started using more regexps to redirect the queries , but it's
quite awful to my eyes. i would really like to input the ratio of "select"
queries i'd like to send on the slave .

what about , instead of round robin dns , writing a small perl script ,
including a socket listening on the port 3306 , this small script would
have to redirect the sql requests on the slave or on the master , but this
time , i could fine tune it , and input for instance 0,3  for the slave ,
so that 3 requests out of 10 would go to the slave.

maybe stg similar already exists ?


thanks for your attention,


*****************************************************
Benjamin KRIEF * Directeur Technique *  IGUANE Studio
Tel:01.56.55.54.20     *      5-7-9 passage des Cloys
Fax:01.56.55.54.24    *                   75018 PARIS
Gsm:06.12.56.50.41     *  mailto:[EMAIL PROTECTED]
*****************************************************

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to