Zeus User Community
Independent community for users of Zeus Technologies products.
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 05, 2010, 11:07:42 AM


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: MySQL Load Balancing  (Read 211 times)
mysqlguy
Newcomer
*
Posts: 1


View Profile
« on: July 21, 2010, 10:26:39 PM »

Hi, I have two objectives I'm trying to accomplish. The first is load balancing MySql, the second is table sharding through zeus.

In my test setup, I have two master nodes in circular replication, and two additional nodes slaving off of the master cluster. Ideally what I want to do is inspect the query to see if it is a read or write. If it's a read just pass it on, if it's a write I want to further inspect the sql statement to determine which table is being written.

So the basic logic is this:
if (read) { pool.select( read_slaves ); }
else {
  if ( tableA || tableB || tableC ) { pool.select( master1 ); }
  else { pool.select( master2 ); }
}

Has anyone done something similar. I've read up on the knowledge base where they are determining pool base on db user - this is not the same functionality that I need. All db connections would use the same credentials, be it read or write. 

Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC

Images and graphics used with permission of Zeus Technology.
Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM