List:General Discussion« Previous MessageNext Message »
From:Vetle Roeim Date:September 7 2007 6:40am
Subject:Re: Use of slave server for read only queries
View as plain text  
On Fri, 07 Sep 2007 07:05:31 +0200, Ashok Chauhan <ashok.linux@stripped>  
wrote:

> Hi All,
>
> I'm using Mysql 5 (with replication) on CentOS 4.4 OS with 2 CPU and 8GB
> of RAM.
> Master & Slave servers have same hardware configration.
>
> Now i want to know, should i use slave server for fetching read only
> queries.
> if yes, then how ?.

You could do it in the application logic, i.e. create a separate  
connection to the slave server that you use for reading, or perhaps this  
would be a good use of the MySQL Proxy <URL:  
http://forge.mysql.com/wiki/MySQL_Proxy >.

In any case, you should be aware that the replication is not synchronous,  
so there might be data on the master that has not yet been added to the  
slave. Various things can affect this, such as heavy queries, for  
instance. Wether or not this is a problem for you will depend on your  
application.

One option could be to use slave servers for users or data where  
up-to-date information is not necessarily required.

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Thread
Use of slave server for read only queriesAshok Chauhan7 Sep
  • Re: Use of slave server for read only queriesVetle Roeim7 Sep
  • Re: Use of slave server for read only queriesShawn Green7 Sep