On Mon, 25 Apr 2005, Fagyal Csongor wrote:

> Hi,
>
> I am new to replication so excuse me if my question is stupid.
>
> The manual recommends that a nice scenario to take advantage of
> replication in MySQL is to send all updating queries to the master
> server, and reading from the slave. I would like to use this setup (as
> usual, I have many more selects than inserts/updates) but I am a little
> concerned what happens if the slave is behind the master in updating its DB.
>
> Say I do like this:
> 1. update something set `a`=1 where c=d (using the master server)
> 2. update something set `a`=2 where c=d (using the master server)
> and then immediately
> 3. select `a` from something where c=d (using the slave)
>
> What if #3 fetches the value of `a` from the slave before `a`=2 takes
> place? Is it possible that I get `a`==1? Or does replication take care
> of that?

If your replication setup is all local to your network, you shouldn't have
any problems. Replication is pretty much instant. We have setups where
there is 60k/s replication traffic (450 updates/s avg) and the slave is
very rarely lagging behind.


> Other than that: does anybody here have a Nagios script that checks if
> replication is running O.K.? :-)

I just put the one I use up on the web, use it at your own risk! :)
http://byveka.com/nagios/


Regards,

Atle
-
Flying Crocodile Inc, Unix Systems Administrator



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to