[Linux-HA] "MySQL Replication/DRBD
alanr at unix.sh
Tue Mar 23 16:03:42 MST 2004
Clint Byrum wrote:
> On Tue, 2004-03-23 at 11:16, Alan Robertson wrote:
>>ha at freightgate.com wrote:
>>>I am still trying to figure out this mysql setup.
>>Mysql replication is currently asynchronous - so it's a bit risky to use it
>>in a failover situation. I'd recommend looking at DRBD - which can be
>>configured for synchronous replication. Then, you have fewer worries.
> I think I would disagree about having fewer worries.
> With MySQL replication, you just have to rely on your application to
> keep things transaction complete. If the transaction finishes, it will
> try to replicate. If, halfway through said replication, the master dies,
> the transaction never makes it to the endpoint.
> Your endpoint still maintains transactional integrity, albeit on a
> slightly older version of the data.
> With drbd, you are relying on the fact that mysqld thought it wrote the
> data. If mysqld is halfway through a big write when the master dies, the
> other side will be in a similar pickle as with replication. It will see
> that it has an unfinished transaction, and roll back to the last known
> good state. Here you're just relying on mysqld to recover from a
> corrupted data storage situation.
If mysql can't deal with this exactly correctly, then it doesn't have
transactional integrity, cannot withstand a crash, and is broken - and not
just for HA.
If it can deal with it, then you can use it. It is my understanding that
it does this correctly in recent versions.
After talking to a friend of mine who works for MySQL, it was he who
pointed out the concerns with asyncrhonous replication.
I asked about DRBD (he's a former SuSE employee, so he knows about it) and
he thought it would be a better solution for an HA failover cluster than
their asynchronous replication, because it can be configured to be synchronous.
Alan Robertson <alanr at unix.sh>
"Openness is the foundation and preservative of friendship... Let me claim
from you at all times your undisguised opinions." - William Wilberforce
More information about the Linux-HA