![](https://secure.gravatar.com/avatar/c19b0cb36d7f40d163e81b1be8da7622.jpg?s=120&d=mm&r=g)
On Mon, Jan 25, 2010 at 11:47 AM, Alex Yurchenko < alexey.yurchenko@codership.com> wrote:
On Mon, 25 Jan 2010 10:47:23 -0800, Jeremy Zawodny
wrote: If the connection between a slave and master is interrupted, the slave won't report itself as being "behind" until the slave's network timeout to the master expires and it reconnect (assuming it can).
Jeremy
Hi Jeremy,
Does it mean that you want to detect network outages using the heartbeat? If so, won't it be easier to just set master-slave connection timeout to the desirable value and let replication system to handle it? I'm asking this not from position of improving current replication in short term, but from position of whether a heartbeat function is needed in replication API?
Not at all. My point is that you cannot (today) rely on MySQL slaves to "self report" in all situations. With a heatbeat that the master sends every N seconds and the slave expects to see every N seconds, it's possible to see latency in the replication stream regardless of the cause--even during weird network outages that the slave won't notice until the timeout is reached. Does that make more sense? Jeremy