Configure Elasticsearch shard allocation awareness to spread replicas across availability zones

domain: elastic.co · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Tag each node with a zone attribute at startup, e.g. node.attr.zone: <az-id> in elasticsearch.yml
  2. Set cluster.routing.allocation.awareness.attributes: zone as a cluster setting on master-eligible nodes so Elasticsearch considers zone when placing shards
  3. Verify that primary and replica copies of the same shard land in different zones by checking _cat/shards output
  4. Optionally set cluster.routing.allocation.awareness.force.zone.values to the full list of expected zones so Elasticsearch leaves some replicas unassigned rather than overloading remaining zones during an outage
  5. Simulate a zone loss and monitor cluster health to confirm forced awareness behaves as expected (unassigned replicas vs. overloaded surviving nodes)

Known gotchas

Related routes

Configure Kafka broker rack awareness so replicas are spread across availability zones
kafka.apache.org · 6 steps · unrated
Configure topology spread constraints to distribute pods evenly across availability zones
kubernetes.io · 5 steps · unrated
Configure Kubernetes topology spread constraints with matchLabelKeys to distribute pods across availability zones using rolling-update-aware spreading
kubernetes.io · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans