MySQL Forums
Forum List  »  Router & Proxy

A newbie-question about DATABASE (tables) LOAD BALANCING
Posted by: Davide C.
Date: July 12, 2007 03:27PM

Hi, I'm new to mysql and load balancing strategies, so please forgive me if I ask a stupid question.

I'm developing a dating site and a crucial part of this project is the search. I mean, users can search, say, a girl who's 26 years old, that comes from Germany, who has blue eyes and so on...the problem is that I really don't know how to balance the load of the queries (I use PHP). I think that you all know the problem : when 5000-6000 people are searching on the same time quering the same tables, the time to wait for a response gets longer and longer.

Someone has told me to use Memcached in order to store query results in a object to avoid repetitive database query. This is good, of course but I'm sure there are other strategies.
Another friend suggested me to use Memcached as a semaphore. To replicate the same "search" table 8 times setting a memcached-value to 1 indicating which tables are currently locked (so other queries use other tables, if there are free) and after the query setting this value to 0.
I made some test that revealed that this is useless. MYSQL handles the query queues better and FASTER than this system. Using only 1 table and letting mysql handle the queues leads to (almost) better results!

So, if anybody has some suggestion...

Thanks in advance

Davide (from Switzerland)

Options: ReplyQuote


Subject
Views
Written By
Posted
A newbie-question about DATABASE (tables) LOAD BALANCING
3554
July 12, 2007 03:27PM


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.