Hi,

Currently our web infrastructure has one main MySQL server, to which connections are 
made by (mostly) mod_perl running under Apache
(on 3 different machines), and several other custom-built application servers on other 
servers (which have persistant connections,
and do both reads and writes).


This machine answers between 300 and 1200 queries per second, and the load average is 
generally around 3-5 (falling below 1
off-peak). We have max_connections set to 100, and are starting to hit this limit 
quite frequently. The machine is a dual PIII
1.2Ghz with 1.5GB RAM and a 73GB SCSI RAID-5 array, and it only runs MySQL.


I am intending on implementing a load-balancing solution, whereby we have a pool of 
around 3 slaves replicating off the main
database server. mod_perl scripts can then make a connection to a random slave, and 
send their read queries there. Hopefully we can
then scale this by adding more slaves to the pool.


Problem: all the mod_perl pages run a few write queries, so they will require a 
connection to the main database server. Since around
80% of our queries are reads, would you recommend that each script has two 
connections: one for read queries, and one for write
queries? We can determine which queries should be run on which connection using Perl.


I have looked at the master-master replication solution so that any machine in the 
replication pool can have write queries run on
it; unfortunately several of our tables use auto_increment fields, so this isn't an 
option.


Any advice on this would be appreciated.


Alex Greg


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

Reply via email to