Tuesday, April 12, 2011

HADR modes

This page indicates that Denali CTP1 is limited to supporting only a single, asynchronous secondary replica.  What other kinds of replicas can we look forward to?

If we look to database mirroring in previous versions of SQL, we can identify both synchronous and asynchronous mirrored database operations.  When data is committed synchronously, this means the primary server waits for the secondary server to commit the mirrored transaction before telling the client that the transaction was committed.  This is better from a DR perspective because it means that a committed transaction is known to be committed on both nodes.  However, the penalty for this high degree of safety is seen in performance.  The primary has to wait for the secondary to commit.

When data is committed asynchronously, the primary does not need to wait for the secondary to commit the transaction.  This means that the data may be out of sync between the primary and the secondary when a disaster occurs on the primary.  In fact, if the secondary is super busy (responding to read-only requests), it might fall behind the primary.

Thus, we need to exercise great caution in choosing which database mirroring mode:

Async = Faster but not as up-to-date ("High Performance")
Sync = Slower but safer ("High safety")

Database mirrors operating in "High safety" mode can also be configured to automatically fail over.  If we want this capability, we must install a third SQL server to act as a witness.  (Each server gets one vote, the witness breaks ties...).

Recall that CTP1 only supports an async availability group.  This means that when we fail over an availability group to the secondary server, we might have data loss.  This is why this page indicates that we can force a failover to the secondary, but we must be prepared to accept possible data loss.  Hopefully the next CTP or beta will provide a synchronous high availability option.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.