List:Replication« Previous MessageNext Message »
From:Rick James Date:December 17 2007 6:43pm
Subject:RE: I want to send writes to the master and reads to the slaves
View as plain text  
* The application needs to know the diff between readonly and readwrite
access; it should connect differently.

* Have some form of load balancer for redirecting traffic to the slaves.
(I assume you plan to have multiple slaves.)
   ** DNS with each slave listed, round robin
   ** VIP hdw (round robin) -- VIP only works on LAN.
   ** software equivalent of the above
   ** DNS + VIP if you have slaves in separate colos.

Caution:  Don't read from a slave and then use the info to decide what
to write to the master.  If there is a replication delay, you could get
inconsistancies.  Instead, use your slaves for truly readonly
sub-applications.

MySQL AB's mysql_proxy might be usable for the what you want.  But it
probably can't read the mind of the application and deal with the
Caution, above.

> -----Original Message-----
> From: Marcus Bointon [mailto:marcus@stripped] 
> Sent: Sunday, December 16, 2007 3:35 AM
> To: Mike Steele
> Cc: replication@stripped
> Subject: Re: I want to send writes to the master and reads to 
> the slaves
> 
> On 16 Dec 2007, at 05:59, Mike Steele wrote:
> 
> > I don't have the authority, prerogative, right, power, or 
> any other  
> > god-like characteristic, necessary to change the 
> application.  So, I  
> > was hoping there was some proxy (something well beyond 
> "balance") I  
> > could stick between the application and the MySQL servers 
> to direct  
> > writes to one server and reads to the rest.
> 
> It might be overkill, but you could probably do this with sequoia.  
> Look on http://sequoia.continuent.org/
> 
> Marcus
> -- 
> Marcus Bointon
> Synchromedia Limited: Creators of http://www.smartmessages.net/
> UK resellers of info@hand CRM solutions
> marcus@stripped | http://www.synchromedia.co.uk/
> 
> 
> 
Thread
I want to send writes to the master and reads to the slavesMike Steele16 Dec
  • Re: I want to send writes to the master and reads to the slavesMarcus Bointon16 Dec
    • RE: I want to send writes to the master and reads to the slavesRick James17 Dec