If you're looking to load-balance the write requests... sorry, MySQL replication won't help much (if at all).
Think about it... every insert/update/delete simply *has* to happen on every server. You only *send* it to one of them, sure... but then it replicates from that one to the other(s) and happens there too. In fact, replicated queries are executed in a single-threaded fashion on the slaves (or the other master, in the case of master-master)... it could very well be *slower*. If you need faster write speeds, you need to: 1) invest better hardware, or 2) somehow design your setup such that the MySQL servers don't all contain the full set of data* *If 1/2 your tables are on server A and the other 1/2 are on server B, then you've effectively split the read *and* write load between them. How to do this without modifying the frontend is an exercise left to the reader. :) Replication will help with load-balancing SELECT statements, but any modification statement still eventually has to happen everywhere, so the overall speed can't be faster than the slowest server. You might look into some of the more esoteric MySQL engines... I have virtually no experience beyond MyISAM and InnoDB, but perhaps some of the more complicated ones would make it easy to spread the data out over multiple servers and balance the load that way. Good luck, Jake On Wed, Jan 14, 2009 at 7:13 PM, xufeng <xuf...@yuanjie.net> wrote: > Hi all, > One website is based on LAMP(Linux+Apache+MySQL+PHP)(that is our case).We > donot have very big tables or complicated database design.We only have one > database. > Because the php code is a third-party product we donot want to make much > modification on the code. > But when it comes to the underlying MySQL deployment,it is a problem. > To loadbalance to write requests(insert,update...) from web program,we have > some options to follow. > One is master-master replication with a loadbalancer in front of the two > MySQL master servers,and the loadbalancer could be LVS(it has been put into > our production for years with stability and performance) or mysql-proxy(I am > not sure of its stability in production). > The other one is MySQL Cluster which is composed by some data nodes and > mysql nodes and one management node. > Our consideration is that the underlying MySQL server farm is transparent > from the web program. > > Any suggestions will be welcomed. > Thank you in advance. > Yours > Xu Feng > > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/mysql?unsub=jakem...@gmail.com > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=arch...@jab.org