Why OpenSearch shard allocation awareness matters during a zone outage
Shard allocation awareness tells the cluster to place copies of each shard in different zones, so that losing one rack or availability zone does not take every copy of a shard with it. Consider a team running OpenSearch in one data center or cloud region with data nodes spread across several racks or zones. Without awareness, the cluster is free to put a primary shard and its replica on nodes that share a failure domain, and a single outage can leave indices red or unavailable even though the cluster reports plenty of capacity. The docs describe the mechanism directly: each node carries a zone attribute, and the cluster balances primary and replica shards across those zone values. The docs also state that a zone receives at most ceil(shard copies / zones) copies of a shard, which is the number to check when you size how many zones you need.
Teams usually need this feature as soon as a cluster spans more than one failure domain that they expect to fail independently, such as separate racks on-premises or separate zones in one cloud region. The OpenSearch cluster documentation recommends shard allocation awareness for availability, and it pairs that advice with two other settings: dedicated cluster manager nodes, and replicas placed on separate nodes. The documentation calls three dedicated cluster manager nodes in three different zones the right approach for almost all production clusters, which matters because cluster manager election needs a majority that survives the loss of one zone. Before you rely on this, confirm the exact attribute name, the zone values you will assign, and how your version handles awareness settings in your own environment with the OpenSearch cluster documentation.
Awareness changes where shard copies are placed. It does not change what they contain, how often you back up, or how fast you can restore. A snapshot repository, a snapshot schedule, a tested restore and a recovery plan for the case where the whole cluster is lost are still required, because a zone-aware cluster sharing one control plane can still be damaged by a bad delete, a faulty upgrade or a corrupted index. Treat awareness as one layer in the availability design, and check it against your recovery point and recovery time targets separately.
How shard copies and cluster manager nodes spread across three zones
The diagram starts with three zones, each holding a dedicated cluster manager node and data nodes tagged with a zone attribute such as zone. Shard allocation awareness uses those tags to place primary and replica copies of each shard in different zones, so a single zone loss still leaves at least one copy of every shard. Check that each zone attribute is set on every node, that the cluster manager nodes are split across zones, and that replica counts leave room for copies in the surviving zones.
Three zones keep cluster manager quorum and shard copies apart during a zone loss.
Which awareness setting fits your zone design
This table compares three ways to use zone attributes: tagging nodes only, awareness that spreads copies across zones, and forced awareness that holds copies back when a zone is missing. Read each row against how many zones you run and how much unassigned shard risk you can accept during an outage. Confirm exact setting names and syntax for your version in the Creating a cluster docs before you apply any of them.
| Option | When it fits | Main trade-off | Behavior when a zone is down or undersized |
|---|---|---|---|
| Zone attribute on every node only | Tagging nodes for planning, dashboards or manual shard placement, with no automatic spreading yet | Tags alone do not stop both copies of a shard from landing in the same zone | Nothing is enforced, so a single zone failure can remove a primary and its replica together |
| Awareness with the zone attribute as the allocation attribute | Three or more zones with enough nodes in each to hold the copies you configure | Copies are spread across zones, but the cluster may still place more copies in one zone if zones are uneven | When a zone drops, the cluster allocates remaining copies in surviving zones, which can overload them until the zone returns |
| Forced awareness with a list of expected zones | Fixed zone layouts where you want the cluster to avoid doubling up copies in one zone, even at the cost of availability | Replicas can stay unassigned when no free expected zone is available, leaving the index yellow | During a zone outage, replicas wait for that zone to return instead of moving to surviving zones |
| Two zones with awareness | Budget-limited sites with only two physical zones, accepting that one zone loss may need manual action | A third zone is needed for cluster manager quorum, so zone loss can still block cluster changes | Copies may crowd into the surviving zone, so capacity planning must assume one zone can carry the full load |
| Undersized zone (fewer nodes than peers) | Rarely intended, but common when hardware is added unevenly over time | Awareness balances copies by zone, not by node, so the small zone fills first | Smaller zones hit disk and shard limits sooner, and recovery may stall on that zone |
| Node-level placement with no zone tag | Single-room labs or test clusters where zone failure is out of scope | No protection against losing a rack or room | Not applicable to zone outages, so pair with a backup and restore plan |
| Ask the vendor or your platform team | Before you choose, confirm whether your version and setup match the documented attribute and syntax | Exact settings and defaults change between releases | Test a zone loss in a non-production cluster before relying on the behavior |
How many shard copies land in each zone
OpenSearch caps how many copies of a shard can sit in one zone, so the zone count and replica count together decide what a single zone failure leaves behind. The four cards below walk through the arithmetic and the decisions that follow from it. The worked numbers are illustrative only.
Count every copy, not just primaries
The limit applies to shard copies, so the starting figure is the number of primaries multiplied by the copies of each one (the primary plus its replicas). An index with 5 primaries and 1 replica has 10 copies to place. Many teams count only primaries when they size zones, which leads to an index that cannot be spread the way they expected. Write the total down per index before you choose a zone count.
Creating a cluster docsApply the ceiling to uneven zones
The documented maximum per zone is the ceiling of shard copies divided by zones. Illustrative example: 10 copies across 3 zones gives a maximum of 4 copies in any one zone, so the split might be 4, 3 and 3. When the division is not even, one zone carries an extra copy, and that zone's loss hurts more than the others. Check the split on a real index rather than assuming it.
Spot unassigned replicas on too few zones
If you have fewer zones than the number of copies that must be separated, the allocator cannot place every copy under the limit. Illustrative example: an index with 1 primary and 2 replicas in only 2 zones has 3 copies, so one zone must hold 2 of them. Replicas that cannot be placed show as unassigned in cluster health and index allocation output, leaving the index with less redundancy than intended. Confirm the allocation state after every zone or replica change.
Fix zones and replicas before templates
Index templates set the primary and replica counts that every new index inherits, and the zone attributes come from how nodes are configured at deployment. Changing either later means reallocating existing shards or rewriting templates for indices already in use. Decide the zone count and replica count together first, then check that the arithmetic works for your largest index. Record the decision where the platform team and the application owners can both see it.
OpenSearch shard allocation awareness setup sequence
This sequence turns a flat OpenSearch cluster into one where shard copies are spread across failure zones, so a single rack or zone outage leaves the data available and the cluster manager quorum intact.
Decide zone names and zone count
The platform owner and the infrastructure team agree on the failure domains the cluster will use, such as three availability zones or three racks in one data center, and give each one a stable name. Confirm that each zone has its own power, network path and storage so that a zone outage is a realistic test case. Write the zone map down with the host list for each zone. The step is done when every planned node has exactly one zone assigned in the change record.
Set the zone attribute on each node
The engineer who builds each node adds a zone attribute to its node configuration so the cluster knows where the node sits. The exact key and syntax are in the Creating a cluster docs, so follow them rather than copying a sample from a forum. Use the same attribute name on every node and only the zone value should change between hosts. Restart nodes in a controlled order so the cluster does not lose quorum during the change. The step is done when all nodes rejoin and the attribute appears on each node.
Confirm node attributes in the cluster API
Before touching allocation settings, the engineer queries the cluster nodes API and checks that every node reports the expected zone value. A node with a missing or misspelled attribute will break awareness silently, so compare the output against the zone map from the first step. Look for nodes that carry the wrong value after a rebuild or a configuration template change. The step is done when the output matches the zone map for every data and cluster manager node.
Configure awareness or forced awareness
The engineer applies cluster-level allocation awareness settings that name the zone attribute, and chooses between plain awareness and forced awareness. Plain awareness spreads copies across zones but still allows them to pile up in one zone when others are unavailable. Forced awareness refuses to place more copies in a zone than the even split allows, which keeps replicas unassigned instead of doubling up. Document the choice and the reason, because forced awareness will leave replicas yellow during a zone loss. The step is done when the settings appear in the cluster settings output with the chosen mode.
Deploy dedicated cluster manager nodes across three zones
The platform team deploys three dedicated cluster manager nodes, one in each zone, and keeps them free of data and ingest roles. The Creating a cluster docs call three dedicated cluster manager nodes in three different zones the right approach for almost all production clusters, so this is the default unless the team has a documented reason to differ. Confirm the cluster manager nodes do not share a host or hypervisor with each other. The step is done when the cluster reports a stable elected cluster manager and the three nodes show the expected roles and zones.
Verify primary and replica placement per index
The engineer lists shard placement for representative indices and confirms that the primary and each replica sit in different zones, and that no zone holds more copies of a shard than the planned maximum for its copy count. For the per-zone limit, the Creating a cluster docs give the ceiling of shard copies divided by zones. Record the output for each index family, since new indices created by templates can differ. The step is done when every checked index shows balanced placement and the evidence is saved with the change record.
Simulate a zone drain in a test cluster
Before relying on the design in production, the team runs a zone drain in a test cluster that mirrors the production layout. They exclude or stop all nodes in one zone, then check cluster health, cluster manager election and whether any replicas remain unassigned, expecting the cluster to recover cleanly or to report the expected yellow state under forced awareness. They then restore the zone and confirm the cluster returns to green. Ask the vendor or your own runbook for the exact drain and exclusion procedure. The step is done when the test results, including timings observed in your environment, are written down and any gaps are assigned an owner.
Placing three cluster manager nodes across zones
The OpenSearch docs call three dedicated cluster manager nodes in three different zones the right approach for almost all production clusters. The reason is quorum. The cluster manager nodes elect a leader and agree on cluster state, and an election needs a majority of the voting cluster manager nodes. With three nodes, a majority is two, so the cluster keeps its ability to elect a leader and publish state after losing any single node or any single zone. With two zones, a split leaves one side with a majority and the other without one, so an outage of the larger zone stops cluster state changes entirely. Cluster manager nodes that also hold data or ingest roles add a second risk: a heavy indexing or search load, a long garbage collection pause, or a disk problem on a data node can slow the node that is supposed to be stable, and cluster state changes stall with it. Dedicate the three nodes to the cluster manager role and keep them small, on separate hosts, and spread them across three zones before adding more capacity elsewhere.
Two-zone designs are common because organizations have two data centers or two availability zones, and they need a deliberate answer for the third voting position. Options include placing the third cluster manager node in a small third failure domain such as a lightweight virtual machine in a separate site, or accepting a design where a single-zone loss can halt cluster state changes and planning a manual recovery procedure. Each option has different operational consequences, and neither is a substitute for a third zone when one is available. Confirm with your platform team which failure domains actually exist, how independent their power, network and storage are, and who would perform a manual recovery at 2 a.m. The OpenSearch cluster docs describe the recommended topology, so check the current guidance for your version before you commit to a two-zone layout.
Security and operations considerations for zone-aware clusters
Zone awareness spreads shard copies across zones, which means node-to-node traffic crosses every zone boundary your cluster uses. Every zone's network path carries replication, recovery and cluster coordination traffic, so each path needs the same transport protection as the others. The OpenSearch Security plugin provides TLS for node and client traffic, and you should enable it on every node in every zone rather than only on the nodes in your primary zone.
- Node-to-node TLS: Configure transport TLS with certificates issued to every node in each zone, so a node added to a new zone joins only with a valid certificate.
- Client TLS: Enable HTTP TLS on the endpoints that applications and load balancers use, and confirm the load balancer in each zone terminates or passes traffic in line with your policy.
- Role-based access control: Define roles that limit who can change cluster settings, including the allocation awareness attributes, so that application users cannot alter shard placement.
- Audit logs: Turn on audit logging for administrative actions so that changes to zone attributes and allocation settings are attributable to a user.
- Zone network paths: Confirm with your network team how traffic between zones is routed, encrypted and firewalled, because the Security plugin protects the OpenSearch layer but does not secure the links between your data centers.
Before go-live, check that every node in every zone presents a valid certificate and that audit logs record a test allocation change.
Zone attributes live in node configuration, and awareness settings live in the cluster settings. Changing either one can move shards, so a change to a zone label or to the awareness attribute list should go through the same review as any other production change. Mislabeled nodes are one of the more common causes of unexpected shard movement, because the cluster will rebalance to satisfy the labels it sees.
- Configuration as code: Keep the zone attribute on each node in version-controlled configuration, so a reviewer can see which zone each node belongs to.
- Settings review: Record every change to the awareness attributes and forced awareness settings with a ticket, the expected effect on shard placement and a rollback step.
- Staged node additions: Add nodes to a zone in a planned window and watch shard relocation before adding the next node.
- Access to settings: Restrict the roles that can write cluster settings to a small administrative group, and use audit logs to review their activity.
- Upgrade interaction: Include zone attributes in the upgrade checklist so that a rolling upgrade does not restart nodes with the wrong attribute.
Before approving a change, confirm with your platform team what shard movement it will trigger and how long the cluster will remain in a relocating state.
After a zone fails, the important signals are cluster health, unassigned shards and whether the surviving zones can hold the copies they are required to hold. Cluster health reports can show yellow or red states, and an unassigned shard count that does not fall is a sign that the remaining nodes cannot satisfy the placement rules. Teams should decide ahead of time which of these signals pages the on-call engineer and which one starts the recovery runbook.
- Health and unassigned shards: Alert on cluster health changes and on the count of unassigned shards, and record the baseline for your cluster during normal operation.
- Cluster manager quorum: Watch the cluster manager nodes across zones, since losing a zone should leave a majority of them available.
- Disk and recovery pressure: Monitor disk watermarks and recovery activity on surviving nodes, because a zone loss can push data onto fewer nodes.
- Audit trail: Use audit logs to confirm which administrative actions were taken during the incident.
- Drill results: Rehearse a zone loss in a non-production cluster and record how long the cluster takes to return to a healthy state.
Before relying on these alerts, test them during a planned drill and confirm that your monitoring stack receives OpenSearch health data from every zone.
Limits to confirm in your environment before you rely on zone awareness
Zone awareness only protects you if the zones are real, close enough to operate as one cluster, and sized for the copies you ask them to hold. The cards below cover the facts to confirm in your own infrastructure and the version and deployment details to verify before you rely on the settings.
Zone count and inter-zone latency
Awareness needs at least as many independent zones as the copies you want to spread, and the zones must share one cluster over a network that stays stable under load. Ask your infrastructure team how many failure domains you really have, whether they share power, top-of-rack switches or a hypervisor host, and what round-trip latency and packet loss look like between them at peak. A zone that fails together with another is not a second zone for OpenSearch.
Creating a cluster docsStorage and network tolerance of a zone loss
When a zone drops, the surviving nodes must absorb the lost shards, rebuild replicas and keep disks below the watermarks that block new allocation. Confirm that the remaining nodes in each zone have enough free disk and memory to hold the shifted copies, and that the storage backing each node does not depend on a single zone. Test whether recovery traffic can run without starving indexing and search.
Replica counts and forced awareness
Each zone can hold at most the ceiling of total shard copies divided by the number of zones. If you set a replica count that needs more zones than you have, or use forced awareness with too few zones, copies can stay unassigned and the cluster reports yellow or red status. Calculate the per-zone limit for each index pattern before you choose replica counts, and decide whether writes should wait for a zone to return.
Version and deployment method support
The zone attribute, awareness settings and cluster manager layout depend on your OpenSearch release and on how you deploy it. Check that your version supports the settings you plan to use, and that your method (Docker, Helm, the Kubernetes operator, packages or Ansible) lets you set node attributes per zone and pin each node to its zone. Read the docs for your exact release before you rely on the behavior.
Installation docsRecovery steps when a zone is down
Write the runbook before the outage: who decides whether to wait for the zone or reroute, how cluster health is checked, when to add nodes in a surviving zone, and how the cluster manager quorum keeps a majority through the loss. Rehearse the steps in a test cluster, including the return of the failed zone and the rebalancing that follows. Record the recovery point and recovery time you actually observe.
OpenSearch shard allocation awareness questions buyers ask
Does shard allocation awareness alone protect my OpenSearch data?
No. Shard allocation awareness spreads primary and replica shard copies across zones so that losing one zone does not remove every copy of a shard, but it is only one layer. It does not protect against accidental deletes, bad index writes, ransomware, or a failure that affects the whole region or cluster. Those cases need snapshots stored outside the cluster, a tested restore procedure, and a recovery plan that states how much data loss and downtime the business accepts. Treat awareness as an availability control and keep it separate from your backup and disaster recovery design, which should be documented and rehearsed.
What drives the cost and effort of a zone-aware OpenSearch design?
Most of the cost is labor and infrastructure, not the awareness setting itself, which is a configuration attribute on each node. The main drivers are the number of zones, the number of nodes you must place in each zone, the cross-zone network capacity and latency between them, and whether existing hardware or virtual machines can be spread across zones without buying more. Three zones with dedicated cluster manager nodes adds nodes that you pay for every month. Ask any partner for a written quote that lists the zone inventory, node count per zone, network work, testing, and documentation as separate line items, and separate one-time work from recurring support.
How long does it take to set up shard allocation awareness across zones?
The duration depends mostly on how ready your environment is, not on the OpenSearch configuration itself. If zones are already defined, nodes are provisioned in each zone, and the network between them is understood, the cluster changes are a small part of the work. If zones need to be created, hardware moved, or the cluster re-sized, the schedule grows with each dependency. Testing failover with a controlled zone loss and validating shard placement also takes time. We do not state a fixed duration here. A written scope should list the environment prerequisites and the change windows needed, so the timeline can be agreed against them.
Can our own platform team configure zone awareness without outside help?
Often yes, if your team already runs OpenSearch in production and understands node roles, allocation settings and cluster health. The change itself is a node attribute, a cluster setting and a rolling restart, and the OpenSearch cluster documentation describes these steps. The harder parts are proving the result: confirming that shard copies land in different zones under load, rehearsing a zone outage, and recording the evidence an auditor or risk owner will ask for. If your team has limited OpenSearch operations experience or no maintenance window for testing, a fixed-scope engagement can cover the design, the change and the verification.
What do we need to provide before a zone awareness engagement starts?
Prepare the information that determines the design before the work starts:
Does zone awareness slow down indexing or searches?
It can change performance, so measure it rather than assume. Awareness forces copies onto nodes in different zones, which means replica writes may cross zone links and add network latency and bandwidth use. Search reads can also be routed differently depending on where copies sit. The effect depends on the document volume, replica count, network capacity between zones and the hardware available. Include a load test against representative data in the scope, compare indexing and query latency before and after the change, and set acceptance thresholds in writing before the test starts.
Can we add zone awareness to a cluster that is already running?
Yes, the setting is applied to nodes and the cluster can be changed in place, but the change must be planned as a production operation. Nodes need a zone attribute, the allocation settings must be applied, and shards will rebalance across zones, which generates network and disk traffic while it runs. Existing indices may have copies already concentrated in one zone, so you should review shard placement first and confirm that enough capacity exists in each zone. Take a verified snapshot before the change and agree on a rollback path and change window in advance.
How DeployOpen plans and delivers zone-aware OpenSearch clusters
DeployOpen scopes, builds, tests and documents shard allocation awareness across zones inside your own infrastructure, so your team can see how zone failures are handled before production traffic depends on it. Every engagement starts with a written scope that names the zones, node roles and failure cases to be verified.
How we scope
- Map your zones, racks or failure domains and confirm which ones share power, network or storage.
- Agree the node roles, including three dedicated cluster manager nodes in three different zones.
- Write down the shard copy count per index and the zone attribute values each node will carry.
How we build
- Configure zone attributes on every node and enable shard allocation awareness with the agreed settings.
- Test forced awareness settings against your zone count so replicas are not left unassigned during an outage.
- Run controlled zone-loss tests in a non-production cluster and record how shards rebalance.
How we hand over
- Deliver the configuration files, allocation settings and a runbook for adding or removing zones.
- Document the expected shard distribution per zone, so your operators can check it after each change.
- Walk your platform and security teams through the failure tests and the recovery steps they will repeat.
How we support
- Engagements are fixed-scope, and the written scope sets the deliverables and timelines before work starts.
- Ongoing support, upgrades and continuous testing are available as a retainer after handover.
- Re-test allocation settings when you add zones, change node counts or move to a new OpenSearch release.

