Skip to main content

Understanding HBase Cross-Cluster Replication for Disaster Recovery

HBase cross-cluster replication provides asynchronous disaster recovery by streaming WAL edits from a source cluster to one or more destination clusters. It is not a high-availability solution—applications must handle failover logic. This updated guide explains replication modes, requirements, configuration steps and operational considerations for modern HBase deployments.

HBase offers built-in multi-site replication for disaster recovery (DR). Replication streams write-ahead log (WAL) edits from one cluster to another cluster or a set of clusters. Because replication is asynchronous, it does not provide automatic failover or zero-data-loss guarantees; applications must handle HA logic at the architectural level.

Replication Topologies

Modern HBase supports several replication patterns:

  • Master → Slave: a primary cluster replicates edits to one or more secondary clusters. Simple and widely used for DR.
  • Master ↔ Master: two clusters replicate to each other. HBase prevents loops via cluster IDs and mutation tracking.
  • Cyclic Replication: multiple clusters replicate in a ring or mesh, combining master-slave and master-master relationships.

The choice of topology depends on consistency requirements, operational workflows and failover plans.

How Replication Works

Replication is WAL-based. Each RegionServer tails its WAL, identifies edits marked for replication and sends them to the target cluster’s RegionServers. Replication does not copy table definitions—only WAL edits—so the target must be pre-configured with matching schema objects.

Key Requirements and Best Practices

  • Version compatibility: All clusters must run compatible HBase and HDFS versions. Cross-version replication between major releases is not supported.
  • Independent ZooKeeper ensembles: Do not share ZooKeeper between clusters. Each HBase deployment needs its own quorum.
  • Full network connectivity: Every RegionServer in cluster A must reach every RegionServer in cluster B, including ZooKeeper access.
  • Matching schemas: All replicated tables and column families must exist on all clusters with identical names and settings.
  • WAL settings: Ensure WAL compression and encryption settings are compatible across clusters. Some features may not replicate seamlessly depending on the version.
  • Deletes and TTLs: Consider increasing TTL and minimum versions on DR clusters to retain more history and support recovery scenarios.

Enabling Replication

Step 1: Enable replication in configuration

Set the following property on every cluster participating in replication:

hbase.replication = true

Step 2: Enable replication on the column family

From the HBase shell:

alter 'your_table', { NAME => 'family_name', REPLICATION_SCOPE => '1' }

A replication scope of 1 marks WAL edits for replication.

Step 3: Add a replication peer

add_peer '1', "zk1,zk2,zk3:2181:/hbase-backup"

List peers:

list_peers

Operational Considerations

Disaster recovery clusters often retain more history:

  • Increase TTL on replicated tables
  • Increase MIN_VERSIONS to preserve older cells

To disable a peer:

disable_peer '1'

Disabling replication does not remove previously replicated edits. To fully reset state, logs must be rolled and the peer re-added. Procedures vary by HBase version; use the appropriate WAL roll command or administrative API for your distribution.

Important Notes

  • Replication is asynchronous; applications must manage failover, consistency checks and cutover workflows.
  • Bulk loads, snapshots and filesystem-level copies are not automatically replicated unless specifically integrated.
  • Rolling upgrades must maintain version compatibility across all clusters to avoid replication stalls.

References

If you need help with distributed systems, backend engineering, or data platforms, check my Services.

Most read articles

Why Is Customer Obsession Disappearing?

Many companies trade real customer-obsession for automated, low-empathy support. Through examples from Coinbase, PayPal, GO Telecommunications and AT&T, this article shows how reliance on AI chatbots, outsourced call centers, and KPI-driven workflows erodes trust, NPS and customer retention. It argues that human-centric support—treating support as strategic investment instead of cost—is still a core growth engine in competitive markets. It's wild that even with all the cool tech we've got these days, like AI solving complex equations and doing business across time zones in a flash, so many companies are still struggling with the basics: taking care of their customers. The drama around Coinbase's customer support is a prime example of even tech giants messing up. And it's not just Coinbase — it's a big-picture issue for the whole industry. At some point, the idea of "customer obsession" got replaced with "customer automation," and no...

What the Heck is Superposition and Entanglement?

This post is about superposition and interference in simple, intuitive terms. It describes how quantum states combine, how probability amplitudes add, and why interference patterns appear in systems such as electrons, photons and waves. The goal is to give a clear, non mathematical understanding of how quantum behavior emerges from the rules of wave functions and measurement. If you’ve ever heard the words superposition or entanglement thrown around in conversations about quantum physics, you may have nodded politely while your brain quietly filed them away in the "too confusing to deal with" folder.  These aren't just theoretical quirks; they're the foundation of mind-bending tech like Google's latest quantum chip, the Willow with its 105 qubits. Superposition challenges our understanding of reality, suggesting that particles don't have definite states until observed. This principle is crucial in quantum technologies, enabling phenomena like quantum comp...

SynthLink Compared to Google’s Natural Questions: A Practical Evaluation

SynthLink evaluates reasoning, synthesis and internal consistency across diverse question types. Google’s Natural Questions evaluates extractive QA: finding short text spans inside structured documents. Because real workloads require interpretation, abstraction and multi-step logic, SynthLink exposes capabilities and failure modes that NQ cannot measure. The two benchmarks are complementary, but SynthLink is more aligned with production tasks. Benchmarks such as Google’s Natural Questions (NQ) dominate model evaluation. They provide a reliable, academically stable test for extractive question answering: short queries, grounded answers, and constrained context ranges. But real workloads rarely look like NQ. Production systems must handle ambiguous inputs, multi-step reasoning, poorly structured prompts, and cases where no canonical answer exists. SynthLink was designed for this broader landscape. It focuses on evaluating reasoning, synthesis and internal consistency rather than snippe...