top of page

What is Data Replication?

Oct 23
12 min read
What is Data Replication?

 

Data replication is the process of creating and maintaining copies of data on more than one system or in more than one location. A replication mechanism copies an initial state and then distributes subsequent changes, or refreshes copies at defined intervals. The copies, called replicas, can support recovery, read access and data distribution, but their freshness and failure guarantees depend on how replication is configured.

 

A second copy is useful only if you know what it contains, how far behind it is and whether it can serve the intended workload. A connected replica can still be stale. A current replica can still contain an accidental deletion. Neither condition is solved simply by adding more copies.

 

Data replication infographic showing a consistent initial copy, ongoing updates, replica application, synchronous confirmation, asynchronous delay and independent recovery points

 

The infographic separates the initial copy, ongoing updates and acknowledgement policy from independent recovery points. These are related responsibilities, with different checks needed for each.

 

How does data replication work?

 

Consider a home lab database that accepts writes on one server and maintains another instance elsewhere. In a common log-based design, the source records changes in an ordered history. The destination receives that history and applies it to its own copy. A file, block or object replication system may track different units, so database behaviour should not be assumed for every storage product.

 

Replication builds on data transfer, but adds rules about which changes to send, how to resume and what the destination should represent. A successful network transfer is only one stage of that process.

 

Start from a consistent state

 

The destination needs a valid starting point. Copying the files of a running database with an ordinary file copier can mix states from different moments. Use an application-supported snapshot, base backup or seeding method that coordinates the starting copy with the change history.

 

PostgreSQL 18 logical replication illustrates the principle: it typically copies a table snapshot, then streams subsequent changes in order. The transition between those stages matters because a write made during seeding must not silently disappear between the initial copy and the ongoing stream.

 

Capture, transfer and apply updates

 

Changed rows, commands, log records, storage blocks or objects are captured according to the implementation. The receiver may buffer incoming work before applying it. Compression, filtering and the chosen representation mean that one megabyte of source data changed does not necessarily produce one megabyte of replication traffic.

 

A reconnect can resume from a known position if the necessary history still exists. Redis Open Source, for example, can perform a partial resynchronisation when its retained history covers the gap; otherwise it requires a full resynchronisation. Plan for that larger operation as well as routine updates.

 

Know what an acknowledgement confirms

 

Received, durable and applied describe different milestones. The following is a conceptual checklist, not a claim that every product exposes the same stages or metric names.

 

Milestone

What has happened

What it does not establish by itself

Source commit

The source accepted the transaction under its local durability policy

Another system holds the write

Replica receipt

The destination received the update

It survives loss of volatile memory

Durable log storage

Recovery information reached the required persistent storage

Queries already see the changed rows

Replica application

The destination processed the update

Every replica is current or failover is safe

 

Always ask which milestone the writer waits for, on how many replicas, and what happens when that requirement cannot be met.

 

Synchronous and asynchronous replication

 

Synchronous replication makes successful completion depend on a specified remote acknowledgement. Asynchronous replication lets the source complete without waiting for that remote requirement. Asynchronous changes can stream continuously; they do not have to wait for a scheduled batch.

 

PostgreSQL 18 provides a concrete example. With suitable synchronous standby configuration, its commit settings can wait for a remote operating-system write, a durable log flush or replay that makes the transaction visible. Those are different promises. The required standbys are selected by policy, rather than necessarily including every copy. The PostgreSQL standby documentation explains the configuration boundaries.

 

Synchronous acknowledgement puts network delay and destination work on the write completion path. If the required confirmations cannot arrive, writes may wait or fail according to the system. Asynchronous replication avoids that wait for ordinary source commits, but a failed source can leave acknowledged writes absent from the surviving replica.

 

Neither label answers every consistency question. A read routed to a different, lagging copy can still return an older value unless the application or platform enforces the required read behaviour. A replication promise also applies to a defined failure model, not to simultaneous destruction or compromise of every copy.

 

For example, a user saves a profile change through the primary and immediately refreshes a page served from a lagging read replica. The old value can reappear even though the write succeeded. Sending that read to the primary, or waiting for a suitable replication position where the platform supports it, addresses a different problem from simply making the write durable.

 

Semisynchronous is another specific contract

 

In MySQL 8.4 semisynchronous replication, the required replica acknowledgements confirm events have been written to the relay log and flushed to disk. They do not mean those events have already been executed on the replica. The source can fall back to asynchronous replication after a timeout, so monitoring the current operating mode matters as much as the intended setting.

 

Treat product terminology as a starting point for reading the contract. Do not infer identical behaviour from similar feature names across databases, NAS appliances or cloud services.

 

What exactly is being replicated?

 

Physical replication works with storage-level representation, such as blocks or database recovery records. Logical replication works with selected data objects and changes, such as rows identified by a key. Selection can make a replica useful for reporting or migration without making it a complete replacement for the source.

 

For example, PostgreSQL 18 logical replication does not automatically copy schema changes or advance the separate sequence state used to allocate future identifiers. Copied identifier values and a ready-to-write replacement database are different things. Application configuration, permissions, extensions, certificates and external files also need an explicit scope check in a recovery design.

 

Object storage has its own rules. Amazon S3 live replication asynchronously copies eligible new and updated objects; existing objects need a separate Batch Replication operation. Enabling replication is therefore not proof that the destination already contains everything that predates the rule.

 

One writer or several?

 

With a single writer, applications send changes to one authoritative source and replicas follow it. Some can serve reads, while others are reserved for recovery. Write capacity does not automatically multiply when more read replicas are added.

 

Multiple writable locations need a way to coordinate concurrent updates or reconcile conflicts. If two disconnected sites change the same record, reconnection alone cannot decide the correct business result. A last-writer-wins rule may discard a valid edit; a conflict-free data structure may merge supported operations but cannot infer every business rule. Choose a product and application design that define these outcomes before allowing independent writes.

 

Replication, synchronisation, backup and sharding

 

These terms describe overlapping mechanisms or different goals. A product can combine several, so evaluate its behaviour rather than relying on the label.

 

Approach

Main purpose

Important limitation

Replication

Maintain additional copies of selected data

Freshness, write authority and recovery readiness need verification

File synchronisation

Align selected files across devices or a service

Conflicting edits and propagated changes need explicit handling

Backup

Retain recoverable states from earlier times

Restoration and the recovery point must be tested

Sharding

Divide a dataset into separately placed portions

A shard is not inherently a second copy of another shard

Caching

Keep reusable data near a consumer

Cached content may expire, be evicted or become stale

 

For a laptop and desktop sharing documents, cloud sync focuses on the user-facing file workflow. Database replication usually has different ordering, transaction and write-authority requirements. Copying a live database into a synchronised folder is not a substitute for its supported replication or backup procedure.

 

A replica can also be the source for a backup, reducing work on the primary. That backup still needs a consistent capture method, retained history and a verified restore path.

 

Freshness, data loss and failover are separate questions

 

Replication lag describes how far a copy trails a defined source position or event. The gap might be measured in bytes, transactions or time. A time value is meaningful only when you know what event it times, how it is updated and how idle periods are handled.

 

Recovery point objective, or RPO, is the maximum acceptable data-loss window for a recovery scenario. Recovery time objective, or RTO, is the maximum acceptable time to restore the service. They are targets. A green connection indicator or a low lag sample does not prove either target has been met.

 

An asynchronously replicated transaction absent from the surviving copy may be lost if the source cannot be recovered. A transaction already stored durably at the destination but not yet applied may instead require replay before service resumes. This distinction changes both the loss assessment and the recovery time.

 

A replica does not promote and route itself by definition

 

Failover must determine which system may accept writes, choose a suitable surviving state and reconnect applications. It must also stop the old primary from returning as a competing writer. This isolation is commonly called fencing. A missed heartbeat alone cannot distinguish a dead server from a broken network path.

 

The PostgreSQL failover documentation explicitly separates replication from the surrounding failure-detection and takeover machinery. It also highlights the risk of both servers believing they are primary after the former source returns.

 

A recovery plan must include the application endpoint, credentials, dependent services and the work needed to establish a new replica after promotion. Two database copies do not make the rest of the service redundant.

 

Worked example: will a replica ever catch up?

 

Techie Broadband calculation: this is a fixed-rate queue model, independently checked with exact arithmetic and a per-second simulation. It is an illustration, not a measured broadband, NAS or database benchmark.

 

Assume a source generates 2 MB/s of replication-stream work and the replica is disconnected for one hour. MB and GB are decimal units. All rates use the same equivalent stream-byte accounting, rather than mixing changed-file size with compressed wire traffic.

 

The queued work is 2 MB/s multiplied by 3,600 seconds, giving 7,200 MB, or 7.2 GB. After reconnection, assume the complete transfer and durable application path can sustainably process 5 MB/s, while the source continues generating 2 MB/s. The spare capacity that drains the old backlog is 3 MB/s.

 

Catch-up time is 7,200 MB divided by 3 MB/s: 2,400 seconds, or 40 minutes. Dividing by the full 5 MB/s would incorrectly ignore the new work arriving during recovery.

 

Sustainable end-to-end capacity

Equivalent useful stream rate

Net backlog change while source generates 2 MB/s

Time to clear the 7.2 GB backlog

5 MB/s

40 Mbps

Falls by 3 MB/s

40 minutes

2 MB/s

16 Mbps

No change

Does not clear at these fixed rates

1 MB/s

8 Mbps

Grows by 1 MB/s

Cannot catch up at these fixed rates

 

The general relationship is catch-up time equals backlog divided by (capacity minus ongoing generation), provided capacity exceeds generation. If it does not, reduce incoming work or increase the bottleneck capacity before expecting the gap to close.

 

Actual systems have bursts, changing compression ratios, application stalls and concurrent work. Measure sustained progress through the slowest stage. A fast receiver link does not rescue a replica whose storage or apply process cannot keep up.

 

The model also assumes that the required history remains available. Once a retained log or snapshot chain is lost, a new seed may be necessary. Retention must cover the credible outage and catch-up period with margin, while alerts protect the source from running out of space.

 

What matters on a UK broadband connection?

 

For a home or small-office source replicating off site, the upstream direction is often the first capacity to check. A large download figure says little about how quickly local changes can leave the premises. Compare your sustained upload speed with the actual replication workload, while allowing for other traffic and the remote receiver.

 

In the model, 40 Mbps describes useful replication-stream progress. It is not a claim that a nominal 40 Mbps broadband service can deliver 5 MB/s of applied changes after protocol overhead, encryption and other users are considered. Avoid deducting overhead twice when a measured application rate already includes its effects.

 

Synchronous traffic also depends on round-trip time and destination confirmation work. An illustrative 20 ms network round trip already places about 20 ms of network waiting on a remote acknowledgement exchange, before receiver processing. It is not a universal transactions-per-second ceiling: batching, pipelining and concurrent sessions change aggregate throughput.

 

A saturated upstream queue can delay acknowledgements and interactive traffic. Scheduling large seeds, limiting bulk replication sensibly and checking latency under load may help, but a rate limit below ongoing change generation simply moves the problem into a growing backlog.

 

Two off-site copies can still depend on the same router, local power or access connection. Conversely, a remote copy can preserve data during a premises outage while local users remain unable to reach it. Decide which failure the placement is intended to survive.

 

How to troubleshoot a replica that is behind

 

Start with the stage where progress stops. Connection health, receipt, durable storage and application should be assessed separately, using compatible positions from the same replication history. Do not subtract unrelated counters or assume a timestamp alone measures the queue.

 

Observation

Likely area to investigate

Useful next check

Source advances, replica receives nothing

Connectivity, authentication, permissions or sender failure

Connection errors and sender/receiver positions

Receipt progresses, application falls behind

Destination CPU, storage, locks or apply errors

Apply-worker errors, resource use and outstanding work

Backlog stays steady after reconnection

Capacity roughly matches ongoing generation

Compare like-for-like rates over a representative interval

Backlog grows despite a healthy link

Generation exceeds a transfer or processing bottleneck

Measure each stage rather than relying on a speed test

Replica repeatedly starts a full copy

Required history unavailable or incompatible

Retention settings, outage duration and replication identity

Data is missing despite low reported lag

Scope, filters, application state or metric interpretation

Check the expected object and a known source transaction

 

Useful evidence to collect before changing configuration includes:

 

  • The source and destination roles, product versions and replication mode currently in use.

  • Last successful progress positions, queue size and the time over which they were observed.

  • The first relevant error, retained-history coverage and free storage on both systems.

  • A non-sensitive test record whose committed state can be checked through the intended application path.

 

Do not skip a failed transaction or reset a replication position merely to remove an alarm. Such actions can create silent divergence. Establish why application stopped and follow the product's documented recovery method.

 

Replication is not independent recovery history

 

Replication often carries unwanted changes just as effectively as intended ones. A valid but mistaken database update can spread without any transport error. Encryption or a checksum can protect transfer integrity without deciding whether that update was correct.

 

Deletion handling is product-specific. Amazon's S3 delete-marker replication guidance explains how configuration determines whether supported delete markers are copied. Do not assume every delete is replicated, or that a destination is protected merely because one deletion mechanism is excluded.

 

Retained snapshots, version history or backups can provide earlier recovery points, depending on the service. Protect that history with suitable access separation and retention controls. If the same compromised account can erase every live copy and every recovery point, geographic distance alone does not supply the intended protection.

 

Assess data integrity through application-level checks as well as transfer and storage verification. Equal file sizes or matching row counts alone cannot establish that the intended records, relationships and transaction state survived.

 

Security and operating costs also extend to every copy:

 

  • Encrypt and authenticate replication connections using the supported mechanism; verify peer identity and certificate renewal.

  • Restrict network exposure and give replication identities only the access their documented workflow needs.

  • Review destination access, encryption keys, logs and retained data, including filtered or excluded content.

  • Budget for storage, change-log retention, transfer, monitoring, restore testing and the staff time needed to recover.

 

How to validate a replication design

 

Define the failure and recovery goals before selecting settings. A reporting replica that can be a minute behind has different requirements from a replacement for a transactional service.

 

  1. Record the source of truth, replicated scope, permitted writers and acceptable RPO and RTO.

  2. Confirm the acknowledgement milestone, required replica count and behaviour during lost connectivity or timeout.

  3. Seed with the supported consistency method, then verify a known committed change at the intended destination.

  4. Test a controlled disconnection and reconnection in an appropriate test environment; measure backlog growth, catch-up and retained-history coverage.

  5. Rehearse takeover, old-primary isolation and application reconnection; check data before accepting new writes.

  6. Restore an independent earlier recovery point and check the application, then document how replication protection is re-established.

 

Record observed recovery time and any missing acknowledged writes for the tested failure. A successful rehearsal supports the conditions actually tested; it does not prove protection against every simultaneous failure or future workload.

 

The Techie Broadband terminology guide connects the bandwidth, latency, storage and security concepts involved. Use those distinctions to describe a replication design precisely rather than treating a second server as a complete availability strategy.

 

Key takeaway

 

Data replication maintains additional copies, but useful protection depends on the details: a consistent seed, complete update coverage, a clear acknowledgement contract, enough spare capacity to catch up and controlled write authority during recovery. Keep independently recoverable history and test the complete service path. A replica count is a starting fact, not a recovery guarantee.

 

Frequently asked questions

 

Is data replication the same as backup?

 

No. Replication maintains additional copies of selected data, while a backup retains a recoverable state from an earlier time. Replication can propagate unwanted updates, so recovery history and restore testing remain necessary.

 

Does synchronous replication guarantee no data loss?

 

It can protect acknowledged writes against the failures covered by its configured acknowledgement and durability policy. It does not guarantee survival of every simultaneous failure, compromised copy or incorrect application update.

 

Can asynchronous replication happen continuously?

 

Yes. Asynchronous updates can stream continuously. The defining distinction is that successful source completion does not wait for the specified remote replication acknowledgement, rather than whether updates are sent in batches.

 

Why is my replica still behind after reconnecting?

 

It must process the backlog while new changes continue arriving. If sustainable end-to-end capacity does not exceed ongoing change generation, the backlog cannot clear at those rates. Retained history and apply errors also need checking.

 

Does replication automatically copy deletions?

 

That depends on the implementation, replicated scope and configuration. Some systems propagate deletions as ordinary changes, while object replication can use specific delete-marker rules. Verify the documented behaviour for the exact deletion operation.

 

Can a home broadband connection support replication?

 

Yes, if its sustained capacity, reliability and delay suit the workload and recovery goals. Check the source's upload path, receiver performance, catch-up headroom and behaviour during outages. A headline download rate alone cannot establish suitability.

 
 
UK Techie Broadband Providers
bottom of page