MySQL Forums
Forum List  »  Replication

How to load balance MySQL Replication with PHP?
Posted by: Ricky Lai
Date: August 26, 2005 03:52AM

Dear Friends,

I am currently running a load balanced web services with 2 web servers and a MySQL servers behind them. However, I found that there is a performance problem with the MySQL server. It is working nearly 100% loading all the time.

I am now considering to use MySQL replication to load balance the SQL server. There are about 20% write and 80% read queries. I think a master-slave implementation is okay. However, I don't know how to do the actual load balance with PHP.

All pages of my site have a write request to update the session data and then followed by select queries. When my PHP script connects to the master server, read & write queries are ok. However, when the PHP script connects to the slave server, no read queries can be performed! What to do next?

I am looking forward for you guys reply!


Options: ReplyQuote

Written By
How to load balance MySQL Replication with PHP?
August 26, 2005 03:52AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.