Replication

3.8 Explain the importance of disaster recovery.

📘CompTIA Server+ (SK0-005)


In a disaster recovery plan, replication helps ensure:

  • High availability
  • Minimal data loss
  • Fast recovery time (low RTO and RPO)

1. Constant Replication

Constant replication means data is copied continuously from the source to the destination in near real time.

Key Points:

  • Changes are replicated immediately or almost immediately
  • Ensures very low Recovery Point Objective (RPO) (minimal data loss)
  • Often used in critical systems like:
    • Databases
    • Financial systems
    • Authentication servers

Example (IT environment):

  • A transaction is recorded in a database → it is immediately copied to the backup server.
  • If the primary database fails, the backup already contains the latest data.

Exam Tip:

  • Think: “Real-time or near real-time data sync”

2. Background Replication

Background replication copies data in the background without affecting the performance of the primary system.

Key Points:

  • Happens asynchronously in the background
  • Does not block user operations
  • May introduce some delay
  • Useful when performance is more important than instant sync

Example (IT environment):

  • A file server copies updated files to another server during idle system time.
  • Users can continue working while replication occurs.

Exam Tip:

  • Think: “Non-blocking replication process”

3. Synchronous vs Asynchronous Replication

A. Synchronous Replication

In synchronous replication, data must be written to both the primary and secondary systems at the same time before the operation is considered complete.

Key Points:

  • Zero or near-zero data loss (RPO ≈ 0)
  • Slower performance due to waiting for confirmation
  • Requires low-latency, high-speed network

Example (IT environment):

  • When a database update occurs, it is written to both primary and backup storage simultaneously.
  • The application waits until both writes are confirmed.

Exam Tip:

  • Think: “Both systems must confirm write before continuing”

B. Asynchronous Replication

In asynchronous replication, data is written to the primary system first, and then copied to the secondary system later.

Key Points:

  • Faster performance
  • Some data loss is possible (non-zero RPO)
  • Works well over long distances (WAN)

Example (IT environment):

  • A user saves a file to the main server.
  • The file is copied to the backup server after a short delay.

Exam Tip:

  • Think: “Primary writes first, replication happens later”

4. Application-Consistent Replication

Application-consistent replication ensures that data is copied in a state that is safe and consistent for applications.

Key Points:

  • Application is temporarily paused or synchronized before replication
  • Ensures data integrity
  • Avoids corruption of application data
  • Often used with:
    • Databases
    • Virtual machines
    • Transaction systems

Example (IT environment):

  • A database flushes all transactions and writes cached data to disk before replication.
  • Ensures no incomplete transactions are copied.

Exam Tip:

  • Think: “Safe snapshot of application data”

5. File Locking

File locking prevents multiple processes from modifying the same file at the same time.

Key Points:

  • Ensures data integrity
  • Prevents conflicts or corruption
  • Important in environments where:
    • Multiple users access the same files
    • Replication is active

Types:

  • Exclusive lock: Only one process can access the file
  • Shared lock: Multiple processes can read but not modify

Example (IT environment):

  • A user edits a file on a shared server → the file is locked.
  • Other users can view but cannot edit until the lock is released.

Exam Tip:

  • Think: “Prevent simultaneous write conflicts”

6. Mirroring

Mirroring is a form of replication where an exact copy of data is maintained on another system or disk.

Key Points:

  • Data is duplicated in real time
  • Often used in RAID 1
  • Provides high availability
  • If one disk/server fails, the other continues operating

Example (IT environment):

  • Two storage disks contain identical data.
  • If one disk fails, the system continues using the second disk without interruption.

Exam Tip:

  • Think: “Exact real-time duplicate copy”

7. Bidirectional Replication

Bidirectional replication means data is replicated in both directions between two systems.

Key Points:

  • Both systems can act as source and destination
  • Changes made on either system are synchronized
  • Useful for:
    • Load balancing
    • Distributed environments
    • Multi-site systems

Example (IT environment):

  • Two data centers:
    • Data center A updates a record → replicated to B
    • Data center B updates a different record → replicated to A
  • Both stay in sync

Challenges:

  • Conflict resolution (if the same data is modified in both places)
  • Requires careful configuration

Exam Tip:

  • Think: “Two-way data synchronization”

Summary (Exam Focus Points)

  • Constant replication → continuous, near real-time data copy
  • Background replication → runs in the background without impacting performance
  • Synchronous replication → data written to both systems simultaneously (no data loss)
  • Asynchronous replication → data copied later (better performance, some risk of loss)
  • Application-consistent → ensures data is in a safe, usable state
  • File locking → prevents data corruption from simultaneous access
  • Mirroring → exact duplicate copy of data (often real-time)
  • Bidirectional replication → data flows in both directions

Final Exam Tip

When answering questions:

  • If the question emphasizes speed and no data loss → choose synchronous replication
  • If it emphasizes performance and distance → choose asynchronous replication
  • If it mentions data consistency → think application-consistent replication
  • If it mentions duplicate storage → think mirroring
  • If it mentions two-way sync → think bidirectional replication
Buy Me a Coffee