Why Your Disaster Recovery Strategy Needs Oracle Data Guard Far Sync
In the world of high-availability database management,
we have long been forced to accept a painful trade-off: Performance or
Protection. If you want "Zero Data Loss" (Synchronous transport),
your standby must be physically close to the primary leaving you vulnerable to
regional disasters. If you move your standby a thousand miles away for true
safety, you’re forced into "Asynchronous" mode, accepting the risk of
data loss if the primary goes down.
While Oracle offers a robust suite of options from
Physical and Logical standbys to the queryable power of Active Data Guard - none
of them truly solve this distance-versus-latency dilemma on their own. Enter Oracle
Data Guard Far Sync. Far Sync isn't just another standby type; it is a
lightweight, high-speed relay that acts as the "missing link" in your
architecture. It allows you to achieve the holy grail of DBA goals: Synchronous-level
protection over Asynchronous-level distances. In this post, we’ll explore why
this small architectural addition is the secret to a zero-compromise disaster
recovery strategy.
Problem: The Latency Tax
In a standard Data Guard setup, you have three main
protection modes. The "gold standard" for zero data loss is Maximum
Protection (Synchronous transport).
However, if your standby is 1,000 miles away, every
single "commit" on your primary database must wait for the redo data
to travel to the standby and for the standby to acknowledge it. This adds
significant network latency to every transaction, often making the
application painfully slow.
Why Other Standbys Aren't Enough
To understand why we need Far Sync, we have to look at
what the others can't do:
- Physical/ADG/Logical:
These define what the standby is and how it handles data.
They don't solve the distance problem. If you want zero data loss
(Synchronous), you are forced to keep the standby close to the primary,
which puts both at risk if a regional disaster occurs.
- Asynchronous
Transport: This solves the performance issue by
not waiting for an acknowledgment, but it introduces data loss risk.
If the primary fails, the most recent transactions likely haven't reached
the remote site yet.
The Solution: Oracle Far Sync
Think of Far Sync as a lightweight "relay
station" for your redo logs.
1. Zero Data Loss at Great Distance
You place a Far Sync instance (which is just a small set
of control files and log files - no data files!) near your primary site (within
~100 miles).
- The
Primary sends redo synchronously to Far Sync (low latency because
it's close).
- Far
Sync then forwards that redo asynchronously to the terminal standby
thousands of miles away.
2. Offloading the Primary
In a typical "Maximum Availability" setup with
multiple standbys, the primary has to manage the overhead of shipping logs to
everyone. Far Sync takes over that job, acting as a distribution hub so the
primary can focus on processing transactions.
3. Reduced Footprint
Unlike a full Physical Standby, a Far Sync instance:
- Does
not have data files.
- Does
not recover data or open the database.
- Consumes
minimal CPU and memory.
- Does
not require a full Oracle license in many configurations (though it
requires the Active Data Guard option).
The Deep Dive: How Far Sync Actually Works
To understand why Far Sync is a game-changer, you have to
look at the Redo Transport Services. In a standard configuration, the
Primary database is burdened with the "Acknowledgement" wait time.
The "Store-and-Forward"
Architecture
Far Sync acts as a lightweight, disk-based relay.
It consists only of a Control File and Standby Redo Logs (SRLs).
- The
Local Hop: The Primary database sends redo to the
Far Sync instance using Synchronous (SYNC) transport. Because Far
Sync is located in a nearby data center (low latency), the "Wait for
Acknowledgement" is negligible.
- The
Remote Hop: Once the Far Sync instance receives the
redo into its SRLs, it immediately acknowledges the Primary. Then, Far
Sync forwards that redo to the terminal standby (thousands of miles away)
using Asynchronous (ASYNC) transport.
The DBA's Secret:
From the Primary’s perspective, it is running in Maximum Availability
mode with zero data loss. From the network’s perspective, the long-distance
haul is handled by a secondary process that doesn't "stall" the
Primary's CPU.
The "Failover" Scenario: What
Happens During a Disaster?
One common question DBAs ask is: "If the Primary
dies, how do I get the data from Far Sync to the Standby?"
Oracle Data Guard has built-in intelligence for this.
During a failover, the remote Standby recognizes it is missing data. It will
automatically attempt to "fetch" the remaining redo from the Far Sync
instance before it completes the transition to becoming the New Primary. This
ensures that even though the transport to the remote site was ASYNC, the final
state is Zero Data Loss.
Comments
Post a Comment