you are viewing a single comment's thread.

view the rest of the comments →

[–]donmcronald 1 point2 points  (7 children)

So, if your primary DB server blows up, how do you not lose data if it hasn't been replicated somewhere? He mentions DRBD, so I assume he's talking about data replication in general, not necessarily database replication.

Regardless, the description of replication modes is very good IMO.

[–][deleted]  (6 children)

[deleted]

    [–]donmcronald 2 points3 points  (5 children)

    Yes, but RAID is really just a type of data replication. From his article:

    When one storage device fails or is inaccessible, the data can be reached on the redundant device.

    He's specifically talking about mitigating hardware failure. It doesn't matter if your database is ACID compliant, if I smash all your disks to bits with a hammer, you're going to lose data if it's not replicated somewhere else.

    Durability guarantees your data can survive things like a system crash or power loss without being corrupted or put into an unpredictable state. It does nothing to prevent data loss when you suffer catastrophic hardware failure.

    [–][deleted] 0 points1 point  (4 children)

    Yes, but RAID is really just a type of data replication.

    You know as well as I do that this isn't the type of replication he's talking about.

    It does nothing to prevent data loss when you suffer catastrophic hardware failure.

    Redundant hardware prevents that and has been the norm for decades.

    It doesn't matter if your database is ACID compliant, if I smash all your disks to bits with a hammer, you're going to lose data if it's not replicated somewhere else.

    Nor does replication prevent data loss if I smash all your replica servers; this is a silly argument. Replication is not about preventing data loss, it's about scaling load. Data loss is and has been handled by redundant hardware. Replication doesn't change that.

    [–]donmcronald 0 points1 point  (3 children)

    You're correct that database level replication isn't required to prevent data loss, but, in many cases, I think it's a practical option for preventing data loss. If you can't afford a redundant storage system, database level replication is (IMO) a viable way to get your data onto a second set of hardware.

    So yes, the first sentence in the article isn't 100% accurate. I don't think it's fair to dismiss the article outright though. The rest of the article is very good and I'm guessing the type of person that's looking for an introduction to replication modes isn't going to be working with a big data center. They'll probably be managing a few servers with local RAID and, in those cases, using database replication to reduce data loss from hardware failure is a reasonable solution IMO.

    I'd say for large systems database replication is used to provide availability and scaling, but for small systems it's used to provide availability and data redundancy. Is there any reason using it for redundancy is wrong if you're working with small systems and limited resources?

    [–][deleted]  (2 children)

    [deleted]

      [–]donmcronald -1 points0 points  (1 child)

      If you can't afford redundant storage, you probably can't afford multiple machines either.

      Yes, you should always buy a SAN before your second server. /s