What Is Multi-Region Disaster Recovery Architecture in Elasticsearch?
A complete, step-by-step guide to keeping search and analytics alive when an entire region goes dark: the building blocks, the strategies, the failover and failback runbooks, and the tests that prove it all works.
It is 2:14 in the morning. A cloud region that hosts your main Elasticsearch cluster has just lost its network. The product search on your shop is blank. The dashboards that the operations team uses to see what is going wrong are also blank, because they live in the same place. The pager is screaming, and someone opens a document called “Disaster Recovery Plan” that was last edited eighteen months ago. It says, in one line, “Fail over to region B.” Nobody in the room has ever done that.
Multi-region disaster recovery architecture is the difference between that night being a calm, rehearsed procedure and a chaotic scramble. It is the design that keeps a second, ready copy of your Elasticsearch world in a different part of the planet, together with the practiced steps for switching to it. This article explains every piece in plain language: the vocabulary, the tools Elasticsearch gives you, the four main strategies, how failover and failback really work, how to keep it secure and affordable, and how to test it until you trust it.
WWhat Is Multi-Region Disaster Recovery in Elasticsearch?
Start here. By the end of this chapter you will know what a disaster is in this context, what “multi-region” means, and which two numbers rule every design decision.
A disaster, in this context, is any event that makes a whole site unavailable or destroys data that you cannot easily rebuild. A power failure across a data center, a fiber cut, a cloud region outage, a flood, a faulty software release that corrupts indices, a mistaken command that deletes them, or an attacker who encrypts your storage: all count. Disaster recovery, often shortened to DR, is the set of designs and procedures that lets you carry on, or quickly restart, after such an event.
A region is a geographic area, for example “Frankfurt” or “Virginia,” made of one or more data centers that share a location and usually share some infrastructure. A multi-region architecture places copies of your Elasticsearch data, and the ability to run on it, in at least two regions that are far enough apart that a single event cannot hurt both.
What is special about Elasticsearch?
Elasticsearch is a distributed system, so people sometimes assume it “just handles” failure by itself. It handles some kinds of failure very well: a machine dying, a disk breaking, even a whole zone going offline inside one region. It was not designed to stretch one single cluster across regions that are hundreds or thousands of kilometers apart, because the constant chatter between nodes needs fast, reliable links. So for region-level disasters, Elasticsearch gives you separate clusters plus tools that keep them in step: snapshots, cross-cluster replication, and cross-cluster search. A multi-region DR architecture is the careful combination of those tools with your ingest paths, your traffic routing and your procedures.
Think of a family that owns a home in one city and keeps a fully furnished second home in another. If a storm destroys the first house, the family drives to the second one, where the beds are made and the fridge is stocked. That works only if someone keeps the second home updated, if everybody knows the address and the route, and if the family has actually practiced the drive. The second home is your DR region. The furnishing is replication. The practiced drive is your runbook.
The two numbers that rule everything
Every DR design is judged by two numbers. The Recovery Point Objective, or RPO, is how much recent data you can afford to lose, measured in time. “RPO of five minutes” means that after a disaster you may lose at most the last five minutes of data. The Recovery Time Objective, or RTO, is how long you can afford to be down. “RTO of thirty minutes” means service must be back within half an hour. Smaller numbers cost more money and more effort. The whole art of the subject is choosing numbers that match the real value of your data, and then designing for them.
A short history
Elasticsearch has offered snapshot and restore for a long time, since the early days of the 1.x series, and for years it was the main DR tool: copy the data to cheap storage, and rebuild elsewhere if needed. Later versions added scheduled snapshot management, index lifecycle management, and searchable snapshots that can serve queries straight from stored snapshots. In the 6.x series, cross-cluster replication arrived, first as a beta and then as a fully supported feature. It allowed one cluster to continuously copy indices from another, which for the first time gave Elasticsearch a built-in, near-real-time way to keep a second region warm. Cross-cluster search, improved security keys for cross-cluster links, and hosted deployment features that make linking clusters across regions easier followed. Today a multi-region design can mix all of these building blocks according to the RPO and RTO you need.
Whenever this article says “primary” it means the region that normally serves your users. “DR region” means the standby region that takes over in a disaster. “Failover” is the switch to the DR region. “Failback” is the careful return to the primary once it is healthy again.
TThe Problem: Why One Region Is Not Enough
A well-built cluster already survives many failures. To see why it still is not enough, list the ways things go wrong and match each to a layer of protection.
Failures come in sizes
It helps to sort failures by how much they take away. A node failure is one machine going down, which replica shards handle automatically. A zone failure is one data center or availability zone inside a region going down, which a cluster spread over three zones with shard allocation awareness can survive. A region failure takes out every zone in a region at once, for example a regional network fault, a control-plane outage at a cloud provider, or a large natural event. And a logical failure is one where the machines are perfectly healthy but the data is wrong: someone deleted an index, a script overwrote documents, a bug wrote garbage, or ransomware encrypted the storage.
| Failure size | Example | What protects you |
|---|---|---|
| Node | A server or disk dies | Replica shards inside the cluster |
| Zone | One data center loses power | Replicas and master nodes spread across three zones |
| Region | A cloud region has a network outage | A second cluster in another region, kept in step |
| Logical | An index is deleted by mistake | Point-in-time copies, such as snapshots, that are kept apart from live data |
Why replicas are not disaster recovery
New users often say, “We already have replicas, so we are safe.” Replicas protect against the loss of machines. They live in the same cluster, in the same region, under the same administrators, and they faithfully copy every change, including harmful ones. If a region goes dark, all the replicas go with it. If someone deletes an index, every replica is deleted in the same instant. Replicas are like keeping two copies of a document in the same drawer of the same office: fine if one copy gets coffee on it, useless if the building burns down.
Why not stretch one cluster across regions?
The tempting idea is to put some nodes in each region and let one big cluster span them. It rarely works well. The nodes must agree on the state of the cluster, and that agreement depends on quick and reliable communication. Between distant regions, delays are long and links sometimes break. Writes must wait for copies on the far side, so every indexing operation slows down. And if the link between regions fails, the cluster has to decide which side keeps going, which risks pausing everything or confusing the system. Elastic’s own guidance is to keep a cluster inside one low-latency location, spread over zones, and use separate clusters for separate regions.
Imagine a group of people trying to make decisions on a conference call where every sentence takes a second to arrive and the line sometimes drops. They can still exchange messages, but they cannot run a fast meeting. Two separate teams that exchange written reports on a regular schedule work much better. That is the difference between a stretched cluster and two clusters with replication.
The business side
Regions really do fail, and so does everything that depends on a single one. Beyond raw outages, many industries have rules. Financial regulators in several parts of the world require firms to show that critical systems can recover within stated times. Contracts with customers include availability promises. Internal policies say that the loss of one location must never mean the loss of the business. A design that survives only zone-level failures may not satisfy any of these.
Example: the holiday shopping peak
A retailer such as Amazon or Walmart earns a large share of its year’s revenue in a few peak days. Search is how customers find products. If product search is down for even an hour at the peak, the loss is measured in millions. Such a company would demand an RTO of minutes and would rehearse the switch before the season begins.
Example: the trading floor
A bank such as JPMorgan uses search and analytics for fraud checks, compliance records and audit trails. Losing recent records is not just an inconvenience; it may be a regulatory breach. Such a firm cares deeply about a small RPO, and it keeps evidence of regular DR drills for its auditors.
None of this means every system needs the most expensive design. A small internal tool might be perfectly fine with a nightly snapshot and a day to rebuild. The next chapters show a ladder of options so that you can pick the rung that fits.
CCore Concepts: The Vocabulary You Need
A dozen words unlock the whole subject. Each one is explained with what it is, why it exists, where you meet it, and a picture from everyday life.
Region and availability zone
A region is a large geographic area. Inside it are several availability zones, physically separate data centers with independent power and networking, connected by fast links. Zones protect you against local failures. Regions protect you against wide ones. Zones are like separate buildings on one campus; regions are separate campuses in different cities.
Replica shard
Elasticsearch splits each index into shards, and can keep extra copies of each shard called replicas. Replicas give safety against node loss and extra read capacity, but they stay inside one cluster. They are the first line of defense, not the last.
Snapshot
A snapshot is a saved copy of indices, and optionally of cluster settings, written to an external repository such as object storage. Snapshots are incremental: after the first one, only the new pieces are stored. A snapshot is a photograph of your data at one moment, kept in a safe place away from the cluster.
Cross-cluster replication
Cross-cluster replication, or CCR, makes a follower index in one cluster continuously copy a leader index in another. The follower pulls changes from the leader, so it stays only seconds behind. It is like a scribe in a second office who copies every new page written in the first office as soon as it appears.
Cross-cluster search
Cross-cluster search lets a cluster query indices in other clusters without copying them. It does not create a backup, but it helps DR designs by letting users search several regions with one request and by letting a DR region read data that lives elsewhere.
Failover and failback
Failover is the act of moving service from the failed primary to the DR region. Failback is the planned return to the primary after it has recovered. Failover is usually urgent and simple in aim. Failback is usually calm but surprisingly tricky in detail, because the two sides may have drifted apart.
Promotion
A follower index is read-only. To accept writes in the DR region it must be promoted, that is, converted into a regular index that no longer follows a leader. Promotion is the technical heart of failover. It is like a deputy becoming the chief when the chief is gone.
Fencing
Fencing means making sure the old primary can no longer accept writes once the DR region has taken over. Without it, both sides may accept different writes and the data diverges, an unpleasant situation often called split-brain. Fencing is like taking the old chief’s keys so that two people are not giving orders at once.
Active-passive and active-active
In an active-passive design, one region serves all traffic and the other waits. In an active-active design, both regions serve traffic at the same time, each usually responsible for its own share of the writes. Active-passive is simpler and cheaper. Active-active offers faster recovery and use of the second region’s capacity, but demands careful design to avoid conflicting writes.
Runbook
A runbook is a written, step-by-step procedure for a specific situation, such as “region failover.” A good runbook can be followed by a tired person at 2 a.m. It names who decides, who acts, which commands to run, and how to check that each step worked.
RPO
The most recent data you can afford to lose, measured in time.
RTO
The longest you can afford to be down before service returns.
Snapshot
An incremental, point-in-time copy stored outside the cluster.
Follower index
A read-only index that continuously copies a leader in another cluster.
Promotion
Turning a follower into a normal, writable index during failover.
Fencing
Stopping the old primary from accepting writes after the switch.
Failback
The careful move back to the primary when it is healthy again.
Runbook
A step-by-step procedure that anyone on call can follow under stress.
RPO, RTO, snapshot, follower, promotion, fencing. If you keep only six words in your head, keep these. Everything else in the article is a way of choosing the numbers and combining the tools.
AArchitecture and Components
Now let us zoom out and look at a complete, typical multi-region design: which parts exist, where each one lives, and how they connect.
A multi-region DR design is not one feature. It is a small system made of several layers that cooperate. The diagram below shows a common warm-standby arrangement: a primary region that normally serves everything, a DR region kept in step, and a traffic manager in front that decides where users go.
flowchart LR
APP["Applications and users"] --> DNS["Global DNS or traffic manager"]
DNS -->|"normal traffic"| PLB["Primary load balancer"]
DNS -.->|"after failover"| DLB["DR load balancer"]
subgraph PRIMARY["Primary region"]
PLB --> PC["Primary cluster across three zones"]
PK["Kibana primary"] --> PC
end
subgraph DRREGION["DR region"]
DLB --> DC["DR cluster across three zones"]
DK["Kibana DR"] --> DC
end
PC ==>|"cross-cluster replication"| DC
PC --> SNAP["Snapshot repository in object storage"]
SNAP -->|"second copy kept in DR region"| SNAP2["Snapshot repository in DR region"]
SNAP2 -.-> DC
Walking through the diagram
At the top left, applications and users send their searches to a name, not to a machine. A global DNS service or traffic manager answers with the address of the load balancer in the region that is currently in charge. Under normal conditions that is the primary. After a failover, the answer changes to the DR region’s load balancer. Inside each region, the load balancer forwards requests to the Elasticsearch cluster, which is itself spread over three zones. Each region also has its own Kibana.
The thick arrow between the clusters is cross-cluster replication: the DR cluster continuously pulls changes from the primary and applies them, so its copy stays seconds behind. The lower arrows show the snapshot path: the primary writes snapshots to object storage, and a second copy of that snapshot data exists in the DR region, from which the DR cluster could restore in an emergency. Replication gives you speed. Snapshots give you a safe historical copy that survives even mistakes that replication would faithfully copy.
Think of a newspaper with two printing plants. A scribe in the second plant copies every page as it is written (replication), so the second plant can start printing within minutes. Separately, the newspaper stores one bound copy of each week’s issues in a fireproof vault in another city (snapshots), in case somebody spills ink on both plants’ current files. A signpost on the main road (the traffic manager) tells delivery trucks which plant to visit.
The components in detail
| Component | What it does | Where it lives |
|---|---|---|
| Primary cluster | Serves all reads and writes in normal times | Primary region, spread over three zones |
| DR cluster | Holds a live copy and takes over after a disaster | DR region, also spread over three zones |
| Cross-cluster replication | Keeps follower indices in step with leader indices | Configured on the DR cluster, pulling from the primary |
| Snapshot repository | Stores incremental point-in-time copies | Object storage, with a copy in the DR region |
| Snapshot lifecycle policy | Schedules snapshots and deletes old ones | Inside the cluster that takes the snapshots |
| Ingest layer | Agents, queues and pipelines that feed data in | Both regions, often with a queue that is mirrored |
| Traffic manager | Directs clients to the right region | Global DNS or global load balancer |
| Configuration as code | Recreates templates, policies, roles and dashboards in both regions | A version-controlled repository plus automation |
| Runbooks and monitoring | Guide humans and detect problems early | Outside both regions, so a disaster cannot take them away |
Configuration is part of the architecture
Replication copies data. It does not automatically copy everything that makes the DR cluster work like the primary. Index templates, lifecycle policies, ingest pipelines, users and roles, saved dashboards in Kibana, alerting rules, and machine learning jobs are all configuration. If you forget them, the DR cluster may hold every document yet be unusable, because the dashboards are missing and nobody can log in. The best practice is to keep configuration as code in a repository and apply it to both regions with the same automation.
Keep your runbooks, monitoring and traffic control in a place that does not depend on the region you are trying to protect. A fire escape plan pinned inside the burning building is not much use.
IInternal Working: How Replication and Snapshots Really Work
This is the engine room. You do not need to be a distributed systems expert, because every idea comes with a picture.
How cross-cluster replication works
Every write to a leader shard is given a growing sequence number, like a page number in a ledger. The leader keeps a record of recent operations, using a mechanism that retains deleted and updated document history for a while, called soft deletes. The follower shard keeps track of its own progress, a value called the global checkpoint, which says “I have applied everything up to number 48,210.” Then it simply asks the leader, over the remote link, “please send me the operations after 48,210.” The leader sends a batch, the follower applies it, moves its checkpoint forward, and asks again. Because the follower does the asking, the leader does not need to know about the follower’s health, and a slow follower does not slow the leader’s writes.
sequenceDiagram
participant W as Writer application
participant L as Leader shard in primary region
participant F as Follower shard in DR region
W->>L: Index a document
L->>L: Record it and assign a sequence number
F->>L: Ask for operations after my checkpoint
L-->>F: Send the new operations in a batch
F->>F: Apply them and advance my checkpoint
F->>L: Ask again for the next operations
Imagine a diary where every entry has a number. A friend in another town phones you every few seconds and says, “I have read up to entry 48,210, what is new?” You read out the new entries, and she copies them into her own diary. If her phone line breaks for an hour, she simply resumes from where she stopped, provided you kept the old entries in the meantime.
Catching up after an outage
What if the link between regions breaks for a while? The leader holds on to the history that the follower still needs, using a mechanism called a retention lease. It is like a librarian who keeps a book on hold for someone. But the hold does not last forever: by default it expires after roughly twelve hours, to prevent a forgotten follower from making the leader hoard history endlessly. If the follower comes back within the lease period, it catches up quickly by replaying the missing operations. If it comes back too late, the history is gone and the follower has to be rebuilt from scratch by copying the leader’s files again, a much slower job. This is a very practical reason to monitor replication and to repair a broken link within hours, not days.
The first copy
When a follower index is first created, it has no history to replay. It performs an initial bootstrap, copying the leader’s shard files across the network, and only afterward switches to the sequence-number method. Bootstrapping a very large index takes time and bandwidth, and the copy speed is deliberately limited by default so that it does not overwhelm the leader or the link. Plan for it when you first set up DR, and when you add a large new index.
What replication does and does not copy
Replication copies documents and the mapping changes that go with them, together with certain index settings. It does not copy cluster-wide items such as templates, lifecycle policies, pipelines, security roles or saved dashboards, and some index-level details, for example aliases, may need to be set up separately. Also, because replication is faithful, it copies mistakes: a deleted document, or a wrong update, is replicated to the follower within seconds. This is exactly why replication alone is not a backup.
How snapshots work
Elasticsearch stores shard data in immutable files called segments. A snapshot copies these files to the repository, and, importantly, only copies files that the repository does not already hold. So the first snapshot is large, but later ones contain only the new segments. Deleting an old snapshot removes only the files that no other snapshot needs. This makes it practical to take snapshots often, for example every fifteen minutes or every hour, and to keep many of them.
A snapshot of many shards is not one instant frozen across the whole cluster. Each shard is captured at about the time the snapshot reaches it. Documents written while the snapshot is running may or may not be included. For most uses, that is fine, but it is worth remembering when you compare document counts after a restore.
| Question | Cross-cluster replication | Snapshots |
|---|---|---|
| How is data copied? | Continuously, by the follower pulling operations | Periodically, by copying new segment files to a repository |
| Typical lag or gap | Seconds to minutes | The snapshot interval, minutes to hours |
| Is the copy ready to use? | Yes, after promotion | No, it must be restored or mounted first |
| Does it copy mistakes? | Yes, almost immediately | Only up to the time of the snapshot, and older snapshots stay clean |
| Extra cost | A running standby cluster | Object storage only |
Restoring from a snapshot
A restore copies the segment files back into a cluster and brings the shards online. The time it takes depends mostly on data size and on how fast the storage and network can deliver. A quick calculation shows why this matters for RTO: restoring 20 terabytes at 500 megabytes per second takes about 40,000 seconds, or a little over eleven hours. Newer features can shorten this by mounting a snapshot as a searchable snapshot, so queries can begin before all the data has been copied, though that feature depends on your license level.
DData Flow and Lifecycle
A DR setup lives through several phases: calm operation, trouble, failover, life in the DR region, and a careful return. Knowing each one prevents most surprises.
stateDiagram-v2
[*] --> Normal
Normal --> Degraded : region impaired
Degraded --> Normal : recovers quickly
Degraded --> FailoverInProgress : decision to fail over
FailoverInProgress --> RunningInDR : DR cluster promoted
RunningInDR --> Resync : old primary returns
Resync --> FailbackInProgress : old primary caught up
FailbackInProgress --> Normal : traffic moved back
Phase one: normal operation
Most of the time nothing is wrong, and this is when the real work happens. Data flows into the primary. Replication copies it to the DR region within seconds. Snapshots run on schedule. Monitoring watches the lag and the health of every link. Configuration changes are applied to both regions. Regular drills prove that the machinery still works. The quality of your disaster response is decided here, long before any disaster.
Phase two: degraded
Then something goes wrong. Maybe the region is slow, or partly down, or nobody is sure. This is the hardest moment, because failing over is a big decision with a cost of its own, and failing over unnecessarily is also a failure. Good teams define in advance the signals that mean “declare a disaster,” who has the authority to decide, and how long they will wait for the region to recover on its own.
Phase three: failover
Once the decision is made, the team follows the runbook: stop writes to the old primary if possible, promote the follower indices, redirect ingestion, switch traffic, and verify. The data loss window equals the replication lag at the moment of the outage, and it is recorded so that the business knows exactly what may be missing.
Phase four: running in the DR region
The DR cluster is now the primary in practice. It serves users and takes writes. It may also need to grow, because a standby sized for cost may be smaller than what production needs, and many teams add nodes at this stage. Meanwhile, snapshots should start from the new primary as soon as possible, so that the safety net is rebuilt.
Phase five: resynchronization and failback
When the original region returns, its data is stale, and it may even contain writes that never reached the DR region before the disaster. It cannot simply be switched back on. Its indices are rebuilt as followers of the now-active cluster, they catch up, and only when they are fully in step does the team plan a calm, scheduled switch back. This can be done during a quiet hour with the same discipline as the failover.
Write
An application writes a document into the primary cluster in normal operation.
Replicate
The follower in the DR region pulls the new operation and applies it within seconds.
Snapshot
On schedule, new segment files are copied into the repository, and a second copy is kept in the DR region.
Disaster
The primary region fails. The last operations that had not yet been replicated are the data loss window.
Promote and switch
Followers become normal indices, ingestion is redirected and traffic moves to the DR region.
Rebuild and return
The old region is rebuilt as a follower, catches up, and eventually takes traffic back.
The most dangerous moment in failback is assuming the old primary has nothing worth keeping. It may hold a few seconds of writes that never crossed the link. Decide in advance how those will be treated: discarded, exported for review, or merged. Making this decision during the incident is stressful and error-prone.
YYour First DR Setup: A Guided Tour
Before going deeper, here is the route you follow to build a first warm-standby design. Knowing the road makes the later chapters easier to follow.
The work is mostly about preparation and decisions. The technical commands are short. The hard parts are choosing numbers, agreeing on scope, and rehearsing. Here is the journey for a beginner building a primary and one DR region.
Before you begin
Check four things. First, the license: cross-cluster replication is a paid feature and generally requires a higher subscription tier on the cluster that follows, so confirm what your license includes. Second, the versions: keep both clusters on compatible versions, and read the compatibility notes before upgrades. Third, the network: the DR cluster must be able to reach the primary through a remote cluster connection, with the right ports and an encrypted, authenticated link. Fourth, the scope: decide which data truly needs protection. Not every index deserves the same treatment.
Set the numbers
Agree with the business on an RPO and an RTO for each class of data. Write them down. Everything else follows from them.
Classify your data
Sort indices into tiers: critical (needs live replication), important (snapshots are enough) and disposable (can be rebuilt from source).
Build the DR cluster
Create a cluster in another region with three zones, the same version family, and sizing suited to your plan.
Link the clusters
Configure the remote connection and the trust or keys that allow the DR cluster to read from the primary.
Start replication
Create auto-follow patterns for the critical index names or data streams so that new indices are followed automatically.
Add snapshots
Register repositories, create snapshot lifecycle policies, and keep a copy of the snapshots in the DR region.
Copy the configuration
Apply templates, lifecycle policies, pipelines, roles, dashboards and alert rules to both regions from one source of truth.
Prepare the switch
Set up the traffic manager with short DNS lifetimes, define how ingestion will be redirected, and write the runbook.
Rehearse
Run a full failover drill in a safe window, measure the real RPO and RTO, fix what breaks, and repeat on a schedule.
Setting up DR is like preparing a family emergency plan. You decide what you can afford to lose (numbers), you sort belongings into must-carry and nice-to-have (classify data), you choose a safe meeting place (DR region), you pack a bag and keep it updated (replication and snapshots), you write down the route (runbook), and you practice a fire drill, because the first time you use the plan should not be during a real fire.
Start with one important data stream, get the whole cycle working including a real drill, and only then extend it to everything else. A small working DR beats a large plan that has never run.
On Elastic’s hosted cloud offerings, linking deployments in different regions and managing snapshot repositories are usually done through the console’s own screens, and some of the settings are handled for you. Follow the hosted documentation for your deployment type, because networking and repository management work differently there.
TThe Strategy Ladder: Four Ways to Recover
There is no single “DR design.” There is a ladder of designs, from cheap and slow to expensive and fast. Pick the rung that fits the value of your data.
flowchart TD
Q["How much data can you afford to lose and how long can you be down?"] --> A{"Hours of loss and downtime acceptable?"}
A -->|"Yes"| B["Backup and restore"]
A -->|"No"| C{"Minutes acceptable and cost matters most?"}
C -->|"Yes"| D["Pilot light"]
C -->|"No"| E{"Must both regions accept writes?"}
E -->|"No"| F["Warm standby"]
E -->|"Yes"| G["Active-active"]
Rung one: backup and restore
The cheapest approach. You take regular snapshots to object storage, keep a copy in another region, and write down how to build a new cluster and restore into it. No second cluster runs in normal times. When disaster strikes, you create a cluster in the DR region, restore the data, and switch traffic. The RPO equals the time since the last usable snapshot, often minutes to hours. The RTO equals the time to build the cluster plus the time to restore the data, often hours or more. This suits internal tools, archives and anything that can be down for a while. It is like keeping insurance papers and a spare key in a bank vault: cheap, but rebuilding takes days.
Rung two: pilot light
A small, always-on core in the DR region, with the rest ready to be created quickly. In Elasticsearch terms, you run a small DR cluster that continuously replicates only the most critical indices, while the bulk of the data is covered by snapshots. When disaster strikes, you promote the critical indices, scale the cluster up, and restore the rest in the background. The name comes from the small flame in a gas heater that lets the full burner light instantly. It gives a much better RTO for the critical part at modest cost.
Rung three: warm standby
A fully working DR cluster runs all the time, continuously following the primary through replication. It is usually smaller or leaner than the primary but complete in function, and it may even serve read-only dashboards or reports to relieve the primary. When disaster strikes, promotion and a traffic switch bring it into service in minutes. The RPO is the replication lag, usually seconds. The RTO is minutes. The cost is a second cluster running around the clock. This is the most common choice for important production search.
Rung four: active-active
Both regions serve users and accept writes at all times. Because replication in Elasticsearch flows in one direction per index, active-active designs achieve two-way sharing by giving each region its own indices, or its own data streams, for the data it writes, and having each region follow the other’s. Alternatively, an ingestion queue sends every event to both regions. Users read from the nearest region, and a disaster simply removes one of the two. The RTO can be close to zero, since the survivor is already serving. The price is complexity: you must prevent conflicting writes, remove duplicates, and manage two-way flows.
| Strategy | Typical RPO | Typical RTO | Relative cost | Complexity |
|---|---|---|---|---|
| Backup and restore | Minutes to hours | Hours to a day or more | Lowest | Low |
| Pilot light | Seconds for critical data, longer for the rest | Tens of minutes to hours | Low to moderate | Moderate |
| Warm standby | Seconds to minutes | Minutes | Moderate to high | Moderate |
| Active-active | Near zero for data that is written in both places | Seconds to minutes | Highest | High |
These ranges are only rough guides. Your real numbers depend on data size, link speed, cluster tuning and how well you have rehearsed.
Consider four ways to be ready if your car breaks down. You can keep the phone number of a rental company (backup and restore), keep a spare car in the garage that needs a tank of fuel and a battery charge (pilot light), keep a second car fueled and parked by the door (warm standby), or have two cars that both drive every day so that losing one just means using the other (active-active). Each step costs more and hurts less.
You do not have to choose one rung for everything. Many organizations run warm standby for the customer-facing search index, pilot light for analytics, and backup and restore for logs older than a month. Match each data set to the cheapest rung that satisfies its numbers.
LLayer One: Resilience Inside a Region
A good multi-region design stands on a good single-region design. If each region is fragile, you will be failing over far too often.
Regions are big, and most incidents are much smaller than a whole region. If each of your clusters can survive the loss of a machine or a whole zone without human help, you reserve the expensive regional failover for real regional disasters. So the first layer of any DR architecture is a cluster that is well spread inside its region.
flowchart LR
subgraph ZA["Zone A"]
M1["Master-eligible node"]
H1["Data node with primary shards"]
end
subgraph ZB["Zone B"]
M2["Master-eligible node"]
H2["Data node with replica shards"]
end
subgraph ZC["Zone C"]
M3["Master-eligible node"]
H3["Data node with replica shards"]
end
M1 --- M2
M2 --- M3
M1 --- M3
Three zones, not two
Elasticsearch decides who is in charge by majority vote among its master-eligible nodes. With three such nodes in three separate zones, the loss of any one zone still leaves two of the three, a majority, and the cluster carries on. With only two zones, the loss of one zone might leave exactly half the voters, which is not a majority, and the cluster may stop. If you truly have only two zones, you need a small tiebreaker node in a third location. The simplest rule is to use three zones wherever possible.
Shard allocation awareness
Nodes can be labeled with the zone they belong to, and Elasticsearch can be told to be zone aware. It then makes sure that a primary shard and its replica never sit in the same zone. With one replica and three zones, losing a zone still leaves a full copy of every shard elsewhere. A related option, called forced awareness, prevents the cluster from piling all the copies into the surviving zones during an outage, which could overload them.
Enough replicas and enough headroom
At least one replica for important indices is the usual rule. You must also leave capacity headroom: if one of three zones disappears, the remaining two must carry the whole load. That means each zone should be sized to hold roughly half of the total load, not a third of it. It is like packing three lifeboats so that any two can carry all the passengers.
Dedicated master nodes and tiers
In larger clusters, run three dedicated master-eligible nodes so that heavy searches cannot starve the coordination work. Use data tiers, hot for recent data, warm and cold for older data, and, where your license allows, frozen for the oldest, so that the expensive fast storage holds only what needs it. Fewer, larger, well-tiered shards also mean faster recoveries after failures, both inside a region and across regions.
Think of a committee that meets in three different buildings and makes decisions by majority. If one building is closed for a day, the other two can still form a majority and continue. If the committee met in only two buildings, closing one might leave a tie. And if each building kept a copy of the minutes, closing one would not lose any records.
Example: a zone failure that nobody noticed
Imagine a large media platform such as Spotify that loses one availability zone at 4 p.m. Because its cluster spreads three copies of critical indices over three zones and keeps spare capacity, users notice nothing and the on-call engineer receives a low-priority notice. The regional DR plan is never triggered, which is exactly the goal: keep the big red button for big red days.
Some clusters look spread out but keep all dedicated master nodes, or all replicas of a busy index, in one zone by accident. Check the actual placement of nodes and shards, not just the design diagram. A single hidden dependency can turn a zone failure into an outage.
LLayer Two: Snapshots as Your Safety Net
Snapshots are the oldest, simplest and most forgiving DR tool. They are your last line of defense, especially against mistakes that replication copies too well.
Repositories
A snapshot repository is a place outside the cluster where snapshots are stored, usually cloud object storage such as Amazon S3, Google Cloud Storage or Azure Blob Storage, or, in private data centers, a shared file system. A repository is registered with the cluster by name, together with the credentials needed to use it. Because it lives outside the cluster, it survives the loss of every node.
Scheduling with snapshot lifecycle management
You do not take snapshots by hand. Snapshot lifecycle management, or SLM, lets you define policies: which indices, how often, and how long to keep the snapshots. A typical policy might take a snapshot every fifteen minutes for critical data and keep the last forty-eight hours, then keep one per day for thirty days. Because snapshots are incremental, frequent snapshots cost little. Your RPO from snapshots is roughly the interval between them.
Putting a copy in another region
A snapshot repository in the same region as the cluster does not protect against a regional disaster. There are two common ways to get a copy elsewhere. The first, and the one Elastic’s guidance favors, is to register two repositories, one in each region, and let policies write to both. The DR region then reads from a repository that sits in its own region. The second is to use the storage provider’s own bucket replication to copy the repository’s files to a bucket in another region. This is convenient, but you must remember that the provider copies files without understanding Elasticsearch’s internal bookkeeping, and that Elastic’s documentation warns against modifying or copying repository contents behind its back. A replica of a bucket taken in the middle of a snapshot may be incomplete. If you use it, test restores from the copied repository regularly, and prefer the two-repository approach when in doubt.
Protection against deliberate harm
Ransomware and malicious insiders like to destroy backups too. Protect the repository with the storage provider’s own tools: versioning, object lock or write-once retention where available, separate accounts and credentials from the ones used by day-to-day administrators, and strict permission policies. An attacker who can delete your snapshots along with your cluster has defeated the whole plan.
What to include
Snapshots can include indices and data streams, and they can also include feature states, which capture internal system data such as security configuration and Kibana saved objects, plus cluster-wide settings. Decide deliberately what each policy includes. For DR, keeping a separate policy for configuration data, taken frequently and kept for a long time, is a good habit, since losing dashboards and users can hurt as much as losing documents.
Restoring, and how fast you can do it
Register the repository
On the DR cluster, register the repository that holds the snapshots. Many teams register it read-only there to avoid accidents.
Choose the snapshot
List the available snapshots and pick the latest good one, checking its state and its list of indices.
Restore critical data first
Restore the highest-priority indices and data streams first, so that essential search returns early.
Restore or mount the rest
Bring back older data in the background, or mount it as searchable snapshots if your license permits, so that queries can begin sooner.
Verify
Compare document counts and run sample searches to confirm that the data looks right.
The main limit is the speed of storage and network. Restoring in parallel across many nodes helps, and so does having many moderately sized shards rather than a few giant ones. The earlier example of about eleven hours for 20 terabytes shows why large data sets should not rely on snapshots alone if the RTO is short.
Snapshots are like a series of dated photo albums stored in a safe deposit box in another city. If your house burns down, the albums survive, and you can rebuild your memories from them. But rebuilding takes time. And because the albums are dated, if you discover that last night’s album was ruined by a mistake, you can go back to the one from the day before.
Test your restores on a schedule. A snapshot that has never been restored is only a hope. Restore a random snapshot into a scratch cluster once a month, time it, and compare the results with production.
LLayer Three: Cross-Cluster Replication for a Live Copy
When minutes of downtime and seconds of data loss are the goal, replication is the workhorse. This chapter shows how to use it well.
Leader and follower
Cross-cluster replication works index by index. An index in the primary cluster is the leader. You create a follower index in the DR cluster that copies it. The follower is read-only: you cannot write to it directly, because it is defined entirely by the leader. This one-way rule avoids conflicts, and it is the reason the failover step, promotion, exists.
Auto-follow patterns
Creating a follower for every index by hand is not practical, especially with time-based indices that appear every day. An auto-follow pattern is a rule on the DR cluster that says “any new index on the remote cluster whose name matches this pattern should be followed automatically.” With data streams, which manage a series of hidden backing indices, the pattern covers the stream, and new backing indices are followed as they appear. Auto-follow is what makes replication low-maintenance.
Promotion: the failover step
When the DR region must take over, each follower index must be converted into a normal, writable index. For ordinary indices the steps are: pause the following, close the index, tell it to stop following (unfollow), and open it again. For replicated data streams, a dedicated promotion operation converts the stream so that it accepts new writes. Promotion is quick, since no data is copied, and it is usually scripted so that it can be run across hundreds of indices reliably.
One way per index
Each follower copies exactly one leader. There is no automatic two-way merge for the same index.
Follower asks
The DR cluster pulls changes, so the primary does not need to track the standby’s health.
Auto-follow
Patterns pick up new indices and data streams without manual work.
Promotion
Converts a follower into a normal index in a few quick steps.
Own replicas
The DR cluster can use its own number of replicas, so the standby can be leaner.
Lag statistics
Statistics show how far each follower is behind, which is your live RPO.
Two-way designs without conflicts
Because one index follows one leader, active-active designs avoid conflicts by splitting who writes what. The European region writes to indices named for Europe, the American region writes to indices named for America, and each region has follower copies of the other’s indices. Searches that use a wildcard over both names see the whole picture in either region. No two regions ever write to the same index, so there is nothing to merge.
Two offices keep a shared ledger this way: the London office writes only in the red books, the New York office only in the blue books, and each office receives a photocopy of the other’s books every few seconds. Everyone can read all the books, and nobody ever writes on the same page.
Limits and cautions
A few facts deserve attention. Replication needs a suitable license. It copies data and mappings, not templates, policies, pipelines, roles or dashboards. It faithfully copies mistakes. If a follower is disconnected for longer than the leader’s retention lease, it must be rebuilt from scratch. If a leader index is deleted, the follower stops following, and its data stays, which is helpful, but the deletion of documents inside a leader is copied. Lifecycle policies also deserve care: the rollover of a time-based index happens on the leader side, and the follower side needs matching policies that treat followers correctly, using the unfollow step where needed before they act on the data.
| Question | Answer |
|---|---|
| Can I write to a follower? | No, not until it is promoted to a normal index. |
| How fresh is the copy? | Usually seconds behind, depending on load and link speed. |
| Is it a backup? | No. Deletions and bad updates are copied as well. |
| What if the link is down for a day? | Beyond the retention window, the follower must be rebuilt from scratch. |
| Does it copy dashboards and users? | No. Manage configuration separately, ideally as code. |
If someone deletes ten million documents by mistake, the follower will delete them too, within seconds. Always keep snapshots, taken to a separate place, alongside replication. Replication protects against a lost region. Snapshots protect against a lost mind.
KKeeping Writes and Reads Flowing: Ingest and Traffic
A perfect copy of your data is useless if nothing can write to it or read from it. This chapter covers the layers in front of and beside Elasticsearch.
The ingest layer is part of DR
Data reaches Elasticsearch through agents, collectors, pipelines and often a message queue. If all of these live in the primary region, a regional outage stops the flow of new data, however healthy the DR cluster is. A complete design therefore repeats the ingest layer in the DR region, and decides how events reach it. The popular pattern is a message queue in each region with the primary’s queue mirrored to the DR region. Producers write to the local queue; workers read from it and index into Elasticsearch. If the primary region fails, the mirrored queue already holds recent events and the DR workers take over.
flowchart LR
SRC["Log and event sources"] --> Q1["Message queue in primary region"]
Q1 --> W1["Ingest workers in primary region"]
W1 --> ESP["Primary Elasticsearch cluster"]
Q1 -->|"mirrored"| Q2["Message queue in DR region"]
Q2 --> W2["Ingest workers in DR region - paused or active"]
W2 --> ESD["DR Elasticsearch cluster"]
ESP ==>|"cross-cluster replication"| ESD
Two ways to feed a standby
There are two basic designs. In the first, replication does the copying: only the primary receives writes, the DR cluster follows it, and the DR ingest workers stay paused until failover. It is simple and avoids duplicates. In the second, the ingest layer does the copying: every event is delivered to both regions and both clusters index it independently. This gives two truly independent copies, which is nice for active-active use, but it requires care, because the two copies are not guaranteed to be identical if delivery fails in one place.
Avoiding duplicates and gaps
Whenever events may be delivered twice, for example after a queue replays them during failover, duplicates can appear. The cure is to give every event a stable identifier, either one that is already in the data or one computed from its content, and to use that as the document identifier in Elasticsearch, so that a second delivery simply overwrites the first. Gaps are handled by keeping events in the queue long enough for workers to catch up. Think of numbering every letter that goes into a mailbox so that a re-sent letter is recognized rather than counted twice.
Routing readers: DNS and load balancers
Users and applications should reach Elasticsearch through names, never through fixed machine addresses. A global DNS service or a global load balancer answers with the region that is currently active. Health checks watch the primary and can be configured to change the answer, though for a whole-region switch many teams prefer a human decision, since the cost of a wrong switch is high. Keep the lifetime of DNS answers short, typically a minute or so, so that clients pick up the change quickly. Test that your client libraries respect short lifetimes: some cache the address for much longer.
Clients that can help themselves
Client applications can be configured with a list of endpoints, so that if the first is unreachable they try the next. This is useful as a second line of defense, but be careful with automatic fallback to the DR cluster while it is still read-only: writes would fail. A safer design lets clients read from both regions but write only where the runbook says writing is allowed.
Searching across both regions
Cross-cluster search lets a user in either region query both clusters at once. In an active-active design, a single search using a name pattern like “logs-*” on the local side and on the remote side returns the combined answer. In a disaster, if the primary is unreachable, the search can skip that cluster and return what the surviving region holds, marked as partial. This is a good way to keep dashboards useful during the crisis.
The neighbors of Elasticsearch
Elasticsearch rarely stands alone. Identity providers, secret stores, deployment pipelines, alerting channels and monitoring systems all sit around it. A DR plan that fails over the cluster but leaves the login system in the dead region cannot be used by anyone. List every dependency and give each one its own answer for “what happens if its region is gone?”
When a post office is closed by a flood, the postal service does not only need a second building. It needs a redirect notice so that letters go to the new address, a second set of sorting staff, and a plan for letters that were in transit. Ingest, traffic routing and dependencies are the redirect notice, the staff and the in-transit plan of your DR design.
Alerting rules and watchers that are copied to both regions can send duplicate notifications, or send nothing if both regions assume the other is responsible. Decide which region runs alerts, keep the standby’s alerts disabled until failover, and include enabling them in the runbook.
FFailover and Failback: The Runbook
This is the moment of truth. Here is the sequence of steps, why each step exists, and how to return safely afterward.
flowchart TD
S1["Detect - alarms and health checks fire"] --> S2["Declare - incident commander decides to fail over"]
S2 --> S3["Fence - stop writes to the old primary"]
S3 --> S4["Record replication position and the data loss window"]
S4 --> S5["Promote followers to regular indices"]
S5 --> S6["Start ingest workers in the DR region"]
S6 --> S7["Switch traffic with DNS or the load balancer"]
S7 --> S8["Verify searches, dashboards and alerts"]
S8 --> S9["Communicate and start failback planning"]
Step by step
Detect
Alarms and health checks from outside the affected region tell you that something is wrong. Confirm with a second source, so you are not reacting to a broken monitor.
Declare
A named incident commander decides, using criteria agreed in advance, such as “primary unreachable for fifteen minutes and no recovery estimate.” Clear authority saves precious minutes.
Fence
Make sure the old primary cannot accept writes. If it is reachable, block writes on its indices or stop its ingest. If it is not, make sure traffic and ingestion can no longer reach it.
Record the position
Check how far behind the followers were. Note the time of the last replicated operation. This is your data loss window, and the business will ask.
Promote
Convert followers into regular indices and promote replicated data streams. Use a script so that hundreds of indices are treated identically.
Restore ingest
Start the ingest workers in the DR region, replaying any events held in the mirrored queue. Enable alert rules there.
Switch traffic
Change the DNS answer or the global load balancer so that users and applications reach the DR region.
Verify
Run known searches, check dashboards, confirm that new data is arriving and being indexed, and compare counts with the recorded position.
Communicate
Tell users and stakeholders what has happened, what data may be missing, and when the next update will arrive.
Human decision or automatic?
Automation is wonderful for the steps of a failover: promoting a hundred indices by script is faster and more reliable than by hand. But most teams keep the decision to fail over in human hands. Automatic region-level failover can trigger on false alarms, such as a short network blip between monitors and the region, and switching back and forth is costly. A good compromise is to automate everything except the decision, and to make the decision as easy as pressing one clearly labeled button.
An example timeline
| Minute | What happens |
|---|---|
| 0 | Region fault begins. Monitors outside the region start failing. |
| 5 | On-call engineer confirms, and opens an incident. |
| 12 | Incident commander declares failover after checking that recovery is not near. |
| 14 | Writes to the old primary are fenced. Replication position is recorded: about 40 seconds behind. |
| 18 | Followers and data streams are promoted by script. |
| 22 | Ingest workers in the DR region start, alerts are enabled. |
| 25 | DNS is switched, with a short lifetime already in place. |
| 30 | Verification completes. RTO achieved: about thirty minutes. RPO: about forty seconds. |
Failback: the careful return
When the original region is healthy again, resist the urge to switch back at once. First, decide what to do with any data the old primary holds that never reached the DR region. Then rebuild the old primary’s indices as followers of the now-active cluster, either by deleting the stale indices and creating fresh followers, or by restoring from a snapshot and following from there. Let them catch up fully and verify that counts match. Only then, in a planned and quiet window, repeat the same runbook in the opposite direction: fence, promote, switch, verify. Some teams decide never to fail back at all, and simply treat the former DR region as the new primary and rebuild a new DR region elsewhere, which can be simpler and safer.
After a fire drill, the whole building does not run back inside the moment somebody shouts that the alarm was false. The fire marshal walks through, checks every room, and only then allows people to return floor by floor. Failback is that careful walk-through.
Write the runbook so that it can be followed by someone who did not write it and who is tired. Use numbered steps, exact names, expected results after each step, and a rollback note. Then hand it to a new team member and watch where they get stuck.
PPerformance, Scalability and Cost
A second region costs money and adds load. This chapter shows where the costs come from and how to keep them sensible.
The bandwidth question
Replication sends every change across regions, so the link must carry your write volume. A simple calculation gives a feel. If your cluster receives 500 gigabytes of new data per day, that is 500,000 megabytes spread over 86,400 seconds, or about 5.8 megabytes per second on average. Real traffic is bursty, so plan for several times that at peak. Compression on the link can help. Cloud providers often charge for data leaving a region, so this steady flow becomes a line on the bill, and it is worth estimating before you decide what to replicate.
The size of the DR cluster
The most important cost decision is how big the DR cluster should be. A standby that matches production is safe and expensive. A leaner standby is cheaper but must grow after failover, which takes time and requires that capacity be available in the DR region exactly when everybody else is also trying to get it. Common compromises include the following.
Fewer replicas
The DR cluster can keep a single copy of each shard, since it is itself a copy, and add replicas after failover.
Replicate only what matters
Follow critical indices live, and cover the rest with snapshots.
Cheaper storage tiers
Hold older data on lower-cost tiers or as searchable snapshots on the DR side.
Reserve capacity
Where the provider allows it, reserve capacity in the DR region so that scaling up after failover cannot be refused.
Practice scale-up
Measure how long growing the DR cluster really takes, and include it in the RTO.
Serve reads
Let the standby serve reports and dashboards so that its capacity earns its keep.
Effects on the primary
Replication adds work to the leader: it must serve the reads that followers request, and it must hold on to history for them. For most systems this extra load is small, but on very busy clusters it is worth watching. Keep shard counts reasonable, since thousands of tiny shards make replication slower to set up and slower to recover. Snapshots also read from the primary’s storage. Schedule heavy snapshot windows away from your busiest hours, and use fast object storage in the same region for the primary’s repository.
Capacity planning in plain steps
First, decide the target: at failover, the DR region must handle X percent of production traffic. Second, translate X into nodes, storage and memory using your normal sizing rules. Third, decide how much of that must exist before the disaster and how much can be added afterward, and multiply the scale-up time by your RTO budget to see if it fits. Fourth, add up costs for compute, storage, transfer and snapshots, and compare with the cost of downtime. Repeat the exercise every time your data grows by half.
Scale picture: a global streaming service
Imagine a service like Netflix with enormous volumes of playback events. Replicating every raw event to a second region would be very costly. A more balanced design replicates the small, valuable indices that support customer-facing search and account history live, keeps aggregated operational metrics in both regions through the ingest layer, and covers the enormous raw logs with snapshots and short retention. The DR bill shrinks dramatically while the business-critical parts keep an RTO of minutes.
Price the DR design per data class rather than as one big number. It often turns out that ten percent of the data is worth ninety percent of the protection, and putting that ten percent on the fastest rung is far cheaper than treating everything alike.
AAdvantages, Disadvantages and Trade-offs
Every DR design is a bundle of trade-offs. Knowing them helps you defend your choices when the budget is discussed, and when the pager rings.
Advantages
- Survives the loss of an entire region, not just a machine or a zone.
- Gives the business clear, measurable RPO and RTO numbers.
- Uses native features: snapshots, replication and cross-cluster search.
- Can serve reads from the standby and reduce load on the primary.
- Helps meet regulatory and contractual resilience requirements.
- Also supports planned events: migrations, maintenance and upgrades with a safe fallback.
- Regular drills improve the whole organization’s operational skills.
Disadvantages
- Costs money for a second cluster, storage and cross-region transfer.
- Asynchronous replication means a small window of data can be lost.
- Requires a suitable subscription level for replication.
- Configuration, security and dashboards must be synchronized separately.
- Failback is complex and easy to get wrong.
- Active-active designs need careful thought about conflicts and duplicates.
- An untested plan gives false comfort.
Trade-off one: loss versus cost
Because replication is asynchronous, the DR copy is always a little behind. Making it synchronous, so that no write is acknowledged until both regions have it, would remove data loss but would slow every write by the delay between regions and would make the primary depend on the DR region being available. Elasticsearch chooses to be fast and available, and accepts a small loss window. If your data cannot tolerate even seconds of loss, you must solve it at the source, for example by keeping events in a durable, replicated queue until both regions have confirmed them.
Trade-off two: speed of recovery versus complexity
Each rung up the ladder recovers faster and is harder to run. Active-active gives the fastest recovery but demands the most from your engineers. Warm standby is a sweet spot for many: minutes of downtime, with a manageable design. Choose the simplest design that meets your numbers, because a simple plan is one that people will actually follow under stress.
Trade-off three: automation versus control
Fully automatic failover is fast but risks acting on false alarms. Fully manual failover is safe but slow. Automating the steps while keeping the decision human tends to give the best balance.
Trade-off four: consistency versus availability
In distributed systems, when the network between sites fails, you cannot have both perfect agreement and full availability. Elasticsearch’s multi-region tools favor availability and eventual agreement. That is why your design must plan for what happens to the small set of writes that had not yet crossed the link.
Comparing the tools
| Tool | Protects against | Weak against | Best role |
|---|---|---|---|
| Replicas in one cluster | Node and zone failures | Region failures and logical mistakes | First line of defense |
| Snapshots | Everything, including deletes and corruption, up to the last snapshot | Slow recovery for large data | Safety net and long-term history |
| Cross-cluster replication | Region failures with small data loss | Logical mistakes, which it copies | Fast recovery of critical data |
| Ingest duplication | Region failures, with independent copies | Divergence if one side misses events | Active-active designs |
| Stretched single cluster | Not recommended across regions | Latency, partitions and slow writes | Avoid across distant regions |
These tools work best together. Most mature designs use all four in different roles, with each covering the weakness of another.
SSecurity and Compliance
A second region doubles the number of places where your data lives, and therefore the number of places to protect. Security must be designed into DR from the start.
Protect the link between regions
Replication and snapshot traffic carries your complete data. The connection between clusters must be encrypted and authenticated. Elasticsearch supports certificate-based trust between clusters, and, in newer versions, a narrower model based on cross-cluster API keys that can be limited to the replication or search access you actually need. Prefer the narrow model where your version and license allow it, keep the keys in the protected secure settings store, rotate them on a schedule, and set expiry dates. Prefer private connections between regions, such as private links or peered networks, over routes across the public internet.
Encryption at rest and in the repository
Data sits on disks in both regions and in the snapshot repositories. Use encrypted volumes for the cluster’s disks, and the storage provider’s encryption with keys that you control for the repositories. Remember that encryption keys are part of DR too: if the DR region cannot use the key that protects the snapshots, the snapshots are unreadable. Keep keys available in both regions, and test their use during drills.
Separate the powers
Give the DR machinery its own identity, with the narrow rights it needs: reading from the primary, writing to the DR cluster, managing snapshots. Keep the credentials for snapshot deletion apart from the credentials used for daily work, and place the backup repository in a separate cloud account or project where possible, so that a stolen everyday administrator login cannot erase the safety net. For emergencies, prepare a break-glass account: a highly privileged login kept sealed, monitored and used only when necessary, so that nobody is locked out at the worst moment.
People and permissions must exist in both regions
Users, roles and role mappings that live inside the primary cluster are not automatically replicated. Keep them as code, or connect both clusters to the same external identity provider, and make sure that identity provider itself survives a regional failure. Nothing is more frustrating than a fully restored cluster that nobody can log in to.
Compliance and where data may live
Replicating data creates a copy in another place, and some laws and contracts care about where copies live. If your data must stay within a country or a legal zone, choose a DR region inside that boundary, or replicate only the data that is allowed to travel. Document which data goes where, and keep evidence of your DR drills, since auditors often ask to see them. Retention rules and legal holds also matter: snapshots that are kept too long can violate deletion promises, while snapshots that are deleted too soon can violate preservation duties.
| Concern | Risk | Control |
|---|---|---|
| Traffic between regions | Eavesdropping or tampering | Encryption, mutual authentication, private connectivity |
| Snapshot repository | Deletion or theft of backups | Separate account, versioning, retention locks, narrow permissions |
| Encryption keys | Unreadable backups in the DR region | Keys available in both regions and tested in drills |
| Users and roles | Nobody can log in after failover | Configuration as code and a resilient identity provider |
| Data residency | Legal breach from copying data across borders | Choose regions inside the boundary and replicate only permitted data |
| Audit evidence | Cannot prove the plan works | Drill reports and audit logs kept for the required time |
Example: a regulated bank
Imagine a bank such as HSBC that must keep customer transaction data inside a legal zone and must prove to regulators that critical systems can recover within a stated time. It chooses a DR region inside the same legal zone, encrypts everything with keys held in both regions, stores immutable snapshots in a separate account, and runs a documented drill twice a year. The reports of these drills are stored for the auditors, together with the measured recovery times.
A second home needs its own locks, its own alarm and its own spare keys. If the second home is easier to break into than the first, thieves will simply go there. And the spare keys must not be kept only in the first house, or a fire will burn the keys along with the front door.
During each drill, deliberately test a login by someone who is not the person who built the system. If they cannot get in and do their part, you have found a gap that is much cheaper to fix now than at 2 a.m.
MMonitoring, Logging, Metrics and Testing
A DR system that has silently stopped working is worse than none. This chapter shows what to watch, and how to prove the whole plan with drills.
What to watch
Elasticsearch gives you statistics for replication that show, for each follower, how many operations it is behind and how long ago it last read from the leader. That lag is your live RPO, so it is the single most valuable number. Snapshot lifecycle policies record the time and result of their last run and of the last failure. Repositories can be verified to check that the cluster can still read and write them. The remote cluster connection reports whether it is connected. All of these can be checked by scripts and alerts.
| What to watch | Why it matters | Healthy sign |
|---|---|---|
| Replication lag per follower | It is your real RPO right now | Seconds, and steady |
| Follower state | A paused or failed follower is not copying | All critical followers active |
| Auto-follow errors | New indices might not be followed | No errors, and new indices appear as followers |
| Remote cluster connection | A broken link stops replication | Connected |
| Last snapshot result and age | Failing snapshots erode the safety net | Recent and successful |
| Repository verification | Credentials or permissions may have changed | Verification passes |
| DR cluster health and disk headroom | The standby must be able to take the load | Green health and comfortable free space |
| Ingest queue mirroring lag | Determines how much can be replayed | Small and steady |
| Configuration drift | Differences between regions cause surprises | No unexplained differences |
Watch from outside
Monitoring that runs inside the primary region dies with the primary region. Put at least the key checks, and the alert delivery itself, in a third place: the DR region, another cloud, or an independent monitoring service. A smoke detector that shares a fate with the house it protects only reports the fire once it is too late.
Logs and evidence
Keep the logs of every drill and every real event: who did what, when, and what the results were. They help you improve the runbook, satisfy auditors and train new engineers. Cluster logs, audit logs and the notes from the incident channel together tell the complete story.
Testing: the only proof
A plan is proven only by trying it. There are several levels of drill, and a healthy program uses all of them.
Tabletop exercise
The team sits together and talks through a scenario step by step, looking for missing owners, unclear decisions and unstated assumptions. It costs almost nothing.
Component test
Restore a snapshot to a scratch cluster. Promote a test follower index. Switch a test DNS name. Each piece is proven on its own.
Partial failover
Fail over one non-critical service to the DR region during a quiet window and run it there for a while, then fail it back.
Full game day
Simulate the loss of the entire primary region, follow the runbook exactly, measure the real RTO and RPO, and include failback.
Review and fix
List every surprise, assign owners, fix the runbook and the automation, and schedule the next drill.
Netflix has publicly described practicing the evacuation of an entire region as a routine exercise, which is a good model of the attitude: if you do it often, it stops being frightening. You do not need that scale to benefit. Even a small team can hold a tabletop exercise every quarter and a real failover of one service twice a year.
A drill that gives the team advance warning, uses hand-picked data, and skips the hard parts proves little. At least once a year, run a drill with less preparation and with the realistic constraints: the person who knows the most is on holiday, and the wiki is unavailable.
DDesign Patterns and Anti-Patterns
Patterns are recipes that experienced teams keep repeating because they work. Anti-patterns are the traps those same teams learned to avoid.
Patterns worth copying
Tiered protection
Give each data class the cheapest strategy that meets its RPO and RTO.
Two safety nets
Combine live replication for speed with independent snapshots for mistakes.
Configuration as code
Apply templates, policies, roles and dashboards to both regions from one repository.
Fence, then promote
Always stop the old primary from accepting writes before the standby takes over.
Human decides, machine executes
Automate every step, but keep the decision to fail over in accountable hands.
Separate writers
In active-active designs, let each region write only to its own indices.
Drills on the calendar
Schedule exercises in advance, so that DR is practiced, not just written.
Watch from outside
Keep monitoring and runbooks where a regional failure cannot reach them.
Traps to avoid
What it looks like
One Elasticsearch cluster with nodes in two or three distant regions.
Why it hurts
Writes slow down by the distance between regions, and a break in the link can leave the cluster paused or confused. The whole cluster shares one fate rather than gaining protection.
Do this instead
Keep each cluster inside one low-latency location spread over zones, and connect regions with replication and snapshots.
What it looks like
“We have replicas and replication, so we do not need snapshots.”
Why it hurts
Both copy mistakes. A mass deletion or a corrupting bug reaches the standby within seconds, and there is nothing clean to return to.
Do this instead
Keep frequent, protected snapshots in a separate account and test restoring from them.
What it looks like
A DR region that shares hidden dependencies with the primary: the same identity system, the same deployment pipeline, the same account, or a control plane that lives in the primary region.
Why it hurts
The event that takes out the primary also takes out the ability to use the standby, so the standby exists only on paper.
Do this instead
List every dependency, and give each one an answer for what happens if its region is gone.
What it looks like
Automatic regional failover with no fencing and no human check.
Why it hurts
A brief network problem can trigger a switch while the old primary is still accepting writes. The two sides diverge, and untangling them can take days.
Do this instead
Fence first, promote second, and keep a human in charge of the decision.
What it looks like
A plan that covers failover in detail and says nothing about failback, configuration, or people.
Why it hurts
The failover succeeds, and then the team spends weeks with a fragile single region, no working dashboards, unclear ownership and no safe way back.
Do this instead
Write the whole cycle: failover, life in the DR region, rebuilding, and failback, including configuration and access.
What it looks like
Setting up DR once, then never touching it again.
Why it hurts
Systems change. New indices are not followed, credentials expire, snapshots fail, and runbooks describe machines that no longer exist. When the disaster arrives, the plan describes a world that is gone.
Do this instead
Monitor the DR machinery continuously, review it after every major change, and practice on a schedule.
BBest Practices and Common Mistakes
A short, practical checklist drawn from careful teams, followed by the mistakes that trip up nearly everyone once.
Start from the business numbers
Agree on RPO and RTO with the people who own the business, per class of data, and write them down. Technology follows numbers, not the other way around.
Make each region solid first
Three zones, zone-aware shard placement, replicas and headroom, so that small failures never need a regional switch.
Use two independent safety nets
Replication for speed, and snapshots kept apart, protected and regularly restored for safety.
Treat configuration as code
Keep templates, policies, roles, dashboards and alert rules in version control, and apply them to both regions with the same automation.
Design the ingest and traffic paths
Mirror queues, give events stable identifiers, use names with short DNS lifetimes, and list every dependency.
Write and rehearse the runbook
Failover and failback, numbered and testable, owned by named people, and practiced on a calendar.
Monitor the DR machinery itself
Lag, follower state, snapshot success, repository health and drift, watched from outside the primary region.
Review after every change and every drill
New data, new teams and new versions all change the picture. Treat the DR design as a living system.
Common mistakes and their cures
| Mistake | What you see | The cure |
|---|---|---|
| Numbers never agreed | Endless arguments about whether the design is good enough | Set RPO and RTO per data class with the business |
| Replication treated as backup | A deletion appears in both regions at once | Add independent, protected snapshots |
| Snapshots never restored | A restore fails at the worst moment | Restore into a scratch cluster on a schedule and time it |
| Follower disconnected for too long | The standby must be rebuilt from scratch | Alert on lag and fix broken links within hours |
| Configuration not copied | Data is present but dashboards and logins are missing | Configuration as code, applied to both regions |
| Long DNS lifetimes | Users keep going to the dead region after the switch | Use short lifetimes and test client behavior |
| Alerts on in both regions | Duplicate notifications or none at all | Decide the active alert region and script the switch |
| No fencing | Both regions accept writes and the data diverges | Block writes to the old primary before promotion |
| Standby too small | The DR region collapses under production load | Size and test for the target load, or plan and time the scale-up |
| No failback plan | The team stays stranded in an unprotected region | Write and rehearse failback, or plan a new DR region |
Keep a one-page summary of the whole design: regions, clusters, replication patterns, snapshot schedules, the RPO and RTO of each data class, who decides, and where the runbook lives. When something breaks at night, a single page is worth more than a hundred-page manual.
RReal-World and Industry Examples
Here is how the same ideas adapt to very different industries. Named companies below are used as familiar illustrations of the kind of scale and problem involved, not as claims about their internal systems.
E-commerce: protecting product search at peak
A retailer at the scale of Amazon depends on product search for a large share of revenue, especially in peak shopping days. It would place the search index on the warm standby rung: a live follower in a second region, promoted within minutes, with the traffic manager ready to switch. Older order-history logs sit on the backup and restore rung. Before every peak season the team runs a full game day, so that nobody meets the procedure for the first time in a crisis.
Banking: proving recovery to regulators
A large bank such as JPMorgan keeps audit trails and fraud-detection data in Elasticsearch. Regulators expect that critical systems can recover within stated times and that the bank can show evidence. The design uses a DR region inside the same legal zone, live replication for recent data, immutable snapshots in a separate account for history, and drills twice a year, with a written report of measured RPO and RTO stored for the auditors.
Streaming media: active-active for a global audience
A service like Netflix serves viewers everywhere. It would give each region its own data streams for the events it collects, follow the other regions’ streams for a global view, and let dashboards use cross-cluster search across all of them. Losing a region removes one source of data, but all other regions keep running. Regular regional evacuation drills keep the muscle memory fresh.
Software as a service: protecting customer search
A company such as Atlassian or Slack offers search across customers’ content. Each customer’s data is in a defined region for legal reasons, so the DR region is chosen inside the same boundary. The team replicates the search indices live, rebuilds them from the source database as a last resort, and keeps the search tier small in the DR region, scaling it out as part of the failover runbook.
Healthcare: durable records, tight privacy
A hospital network keeps clinical event search in its own region and must keep patient data in-country. Its DR region is another data center inside the country. It relies on frequent, encrypted snapshots to a locked repository and a smaller warm standby for the most critical indices. The runbook names who can authorize failover, and a break-glass account is tested every quarter.
Security operations: never blind
A security team’s search cluster is the place where analysts hunt for intruders. If it is down during an attack, the team is blind at exactly the wrong moment. It therefore runs a warm standby in a second region, keeps detection rules and dashboards as code in both, and includes the standby in its weekly health review.
A complete walk-through: the product search index
To make everything concrete, here is how a team might build DR for a product search index, from a blank page to a proven design.
Set the numbers
Together with the business, the team agrees on an RPO of two minutes and an RTO of thirty minutes for product search, and an RPO of one day for old logs.
Choose the rungs
Warm standby for product search, backup and restore for logs. Everything else is classified as rebuildable from source.
Strengthen the primary
Confirm three zones, zone-aware allocation, one replica and enough headroom to lose a zone.
Build the standby
Create a cluster in the second region with sizing for seventy percent of production, a single replica, and a documented plan to grow it.
Link and replicate
Establish the encrypted link with a narrow key, and create an auto-follow pattern for the product search indices.
Add snapshots
Take snapshots every fifteen minutes into a repository in each region, kept in a separate account with retention locks.
Copy the configuration
Apply templates, policies, roles and dashboards to both regions from the repository, with alerts disabled on the standby.
Prepare traffic and ingest
Mirror the queue, give every product update a stable identifier, and set a sixty-second DNS lifetime.
Drill and measure
Run a full game day. Measured result: RPO forty seconds, RTO thirty-five minutes. The team finds that the standby needed ten more minutes to scale, fixes the automation, and repeats the drill until it lands within thirty.
After the launch, the story from the start of this article changes. At 2:14 a.m. the region goes dark, the on-call engineer opens a runbook she has practiced, and a little over half an hour later customers are searching again.
FFrequently Asked Questions
Short answers to the questions that beginners ask most often.
SSummary and Key Takeaways
The whole article in one place. If you remember only this box, you still know the essentials.
Key Takeaways
- What it is: Multi-region disaster recovery in Elasticsearch means keeping a ready, separate cluster in another region, together with practiced procedures to switch to it, so that search and analytics survive the loss of a whole region.
- Start with numbers: RPO is how much data you can lose and RTO is how long you can be down. Agree on them per data class, then choose the cheapest strategy that meets them: backup and restore, pilot light, warm standby, or active-active.
- Use layers: Replicas and three zones handle small failures, snapshots protect against mistakes and corruption, cross-cluster replication gives a live copy in another region, and cross-cluster search helps users see across regions.
- Do not stretch one cluster: Keep each cluster inside one low-latency location and connect regions with separate clusters, because distance slows writes and network breaks are dangerous.
- Replication is not backup: It copies mistakes within seconds, so keep independent, protected snapshots and test restoring them.
- Design the whole system: Mirror ingest queues, give events stable identifiers, manage configuration as code, route traffic by name with short DNS lifetimes, and list every dependency.
- Practice the cycle: Fence, promote, switch and verify on failover, plan failback or a new DR region, monitor lag and snapshots from outside the primary region, and prove it all with regular drills.