The Voting-Only Node in Elasticsearch

The Voting-Only Node in Elasticsearch

Discover how a small, quiet node can cast the deciding vote that keeps an Elasticsearch cluster alive, why it can never become the boss, and how to place it so your cluster survives the loss of an entire data centre zone.

Imagine a village council with five members who must choose a chairperson. Any decision, from repairing the well to opening the market, needs more than half of the members to agree. Now suppose two villages share one council and the road between them is cut by a flood. If each village holds exactly half of the members, neither side has a majority, and the council freezes. Nobody can decide anything.

The village fixes this by inviting one respected neighbour who lives far away. This neighbour may vote on every decision, but has promised never to stand for chairperson. Because of that promise, the neighbour needs no office, no staff and no heavy paperwork, only a seat and a voice. When the flood comes, whichever village can still reach the neighbour wins the majority and keeps running. That neighbour is a voting-only node.

1The Problem: Who Is in Charge, and Who Decides?

Every shared system needs one clear leader and a fair way to choose that leader.

Elasticsearch is a distributed search and analytics engine. “Distributed” means the work is spread across many computers, each called a node, and the group of nodes working together is called a cluster. Spreading work makes the system faster and safer, because no single computer failure has to stop everything. But it creates a new question: when many nodes hold pieces of the same picture, who keeps the master copy of the plan?

The plan is called the cluster state. It records which indices exist, what their fields look like, which nodes are members, and which node holds which shard. If two nodes each believed they were in charge and each changed the plan differently, the cluster would fall into what engineers call split brain. Different parts of the cluster would accept different writes, and later it would be nearly impossible to merge them back without losing data.

Simple Analogy

Two air-traffic controllers in the same tower each think they are the only one in charge. One tells a plane to descend to 3,000 metres, the other tells another plane to climb through 3,000 metres. Both controllers are working hard and being helpful, yet together they cause a disaster. A cluster needs exactly one controller at a time.

Elasticsearch prevents split brain by using a majority vote. A node can act as the leader only while more than half of a specially chosen group of nodes agree that it is the leader. Two groups cannot both hold a majority of the same set, so two leaders can never exist at once. The voting-only node is a clever helper inside this majority system.

1 leader
at any moment, never two
Majority
of voters must agree on every change
Vote, never lead
the special promise of a voting-only node

2What Is a Voting-Only Node?

The definition, the vocabulary, and the single idea that ties them together.

A voting-only node is a master-eligible node that takes part in master elections and in confirming cluster changes, but is never allowed to become the elected master itself. In Elasticsearch it is created by giving a node both the master role and the voting_only role.

Read that sentence slowly. The node is “master-eligible”, so it sits in the club of nodes whose votes count. The node is “voting-only”, so it has promised never to run for leader. Its whole value is its vote. It can be very small and cheap, yet it can be the vote that gives a majority to one side of a broken network.

Words you need to know

Term 1

Node

One running copy of Elasticsearch on one machine, container or virtual machine. It is one member of the team.

Term 2

Master-eligible node

A node allowed to vote in elections and, unless it is voting-only, allowed to be elected leader.

Term 3

Elected master

The one node currently chosen as leader. It manages the cluster state. Also called the active master.

Term 4

Quorum

The smallest number of votes that counts as a majority. For a group of size n it is more than half of n.

Term 5

Voting configuration

The current list of master-eligible nodes whose votes count. Elasticsearch keeps this list up to date automatically.

Term 6

Tiebreaker

An extra voter placed so that ties and even splits cannot happen. A dedicated voting-only node is the classic tiebreaker.

Term 7

Dedicated voting-only node

A voting-only node that has no other job at all. It does not store index data and does not serve searches.

Term 8

Cluster state

The shared plan of the cluster: indices, mappings, settings, node list and shard locations.

i
Availability note

The voting-only role belongs to Elasticsearch’s default distribution and arrived in the 7.x line. Confirm the details for your exact version in the official node settings documentation before you plan a production layout.

“A voting-only node is a voter with no ambition.”

3Node Roles at a Glance

A voting-only node only makes sense once you see the other jobs a node can hold.

In Elasticsearch a node’s job is decided by its roles. A role is a label, set in the node’s configuration under the setting node.roles, that tells the node what work to accept. One node can hold many roles, or just one. Small clusters often give every node many roles. Large production clusters usually separate them so each machine can be sized for one kind of work.

RoleWhat it doesEveryday comparison
masterMakes the node eligible to vote in elections, and to be elected leaderA member of the village council
voting_onlyTogether with master, lets the node vote but never leadA council member who refuses to be chairperson
data and data tiersStores shards and answers search and indexing workA warehouse holding the goods
ingestRuns pipelines that transform documents before storing themA packing station at the warehouse door
mlRuns machine learning jobsA specialist analysis lab
transformRuns transforms that summarise dataAn accountant producing summary sheets
remote_cluster_clientConnects to other clustersAn ambassador to another village
Coordinating only (no roles)Receives requests, fans them out and gathers answersA receptionist directing visitors

Reading roles in the node list

Elasticsearch’s cat nodes API prints a short letter code for each node’s roles. The letter m stands for master-eligible, d for data, i for ingest, and v for voting-only. An asterisk in the master column marks the node currently elected as leader. If you see mv next to a small node, you are looking at a dedicated voting-only node.

Simple Analogy

A restaurant has a head chef, line cooks, waiters, a cashier and a manager. In a tiny cafe, one person does everything. In a big restaurant, each person has a role and the kitchen runs smoother. Node roles let you organise an Elasticsearch cluster the same way.

!
Common misconception

A voting-only node is not a special kind of Elasticsearch program. It runs the same software as every other node. The difference is only in its role settings, which tell it what to accept and what to refuse.

4The Elected Master’s Job

To understand why a node might promise not to lead, see what leading involves.

The elected master is the one node that is allowed to change the cluster state. Everyone else may read the plan, but only the master writes it. That is what keeps the plan consistent. The master’s work is light compared with a data node’s, yet it is critical, because the whole cluster waits for it.

Duty 1

Creating and deleting indices

When someone creates an index, the master records it in the plan and decides where each shard will live.

Duty 2

Tracking nodes

The master notes which nodes join or leave and reacts, for example by rebuilding lost shard copies elsewhere.

Duty 3

Allocating shards

It assigns primary and replica shards to nodes and moves them to keep the cluster balanced.

Duty 4

Updating mappings and settings

When a new field appears or a setting changes, the master writes the change and shares it.

Simple Analogy

The master is like the school principal who keeps the timetable. Teachers teach and students learn without the principal, but when a class moves rooms or a teacher falls sick, only the principal can update the timetable so that everybody agrees on it.

What happens when there is no master

Without an elected master, the cluster cannot change its plan. Searches and indexing on shards that are already in place may continue for a while, because data nodes know where their shards are. But you cannot create an index, cannot recover a lost shard copy, and cannot change a mapping. The cluster reports that no master is available, and many operations fail with a master-not-discovered error. A cluster without a master is technically alive but cannot heal itself.

Why some nodes should not lead

The master must stay responsive because every cluster-state change goes through it. A leader that is overloaded, far away on a slow link, or running on a tiny machine will slow down the entire cluster. So you want a leader on a healthy machine near the other nodes. Yet you may still want votes from machines that cannot meet that standard, such as a small machine in a distant third location. Voting-only nodes let you separate “counts as a vote” from “can be the leader”.

i
Key idea

Leadership needs strength. Voting only needs presence. The voting-only role lets you buy presence cheaply.

5Voting and Quorum: The Mathematics of Majority

The whole design rests on one small piece of arithmetic.

A quorum is more than half of the voters. If there are three voters, the quorum is two. If there are five voters, the quorum is three. The rule “always need more than half” guarantees that any two quorums must share at least one voter. Because that shared voter would never vote for two different leaders at the same term, two leaders cannot both be confirmed at once.

Voters in the configurationVotes needed (quorum)Voters you can lose and still decide
110
220
321
431
532
743

Why two voters are no better than one

Look at the table again. With two voters you need both of them, so losing either one freezes the decision-making. Two voters are actually worse than one, because you have doubled the chances that something fails while gaining no extra tolerance. The same is true of four compared with three. Even numbers waste a voter. This is why Elasticsearch keeps the count of voters odd, and may quietly leave one master-eligible node out of the voting configuration when the total would be even.

Simple Analogy

A jury of twelve can split six to six. A jury of eleven cannot. Odd numbers remove the deadlock. The voting-only tiebreaker is the extra juror added so the room can never divide evenly.

Where the voting-only node fits into the arithmetic

A voting-only node counts as a full voter in this arithmetic. Its vote is worth exactly as much as any other master-eligible node’s vote. The only difference is that it never asks for votes for itself. So in a cluster with two electable nodes and one voting-only node, there are three voters, the quorum is two, and the cluster can lose any one of the three and carry on.

!
Important limit

Votes are not enough by themselves. Somebody must be electable. A cluster with one electable node and two voting-only nodes has a healthy quorum arithmetic, but if that single electable node fails, nobody remains who can stand for leader. Always keep at least two electable master-eligible nodes in a production cluster.

“Votes keep the cluster safe. Electable nodes keep it running.”

6A Short History: From Manual Counting to Automatic Voting

The voting-only node exists because earlier designs were hard to run safely.

Early Elasticsearch versions used a discovery system that relied on a human to tell every node how many master-eligible nodes existed. The administrator had to set a number called the minimum master nodes. If the number was wrong, or if the cluster grew and the number was not updated, split brain could occur and data could be lost. Many production incidents came from this single setting.

1

The manual counting era

Administrators set the quorum size by hand. Growing or shrinking the master-eligible group required careful edits on every node, and mistakes were common.

2

A new coordination system in version 7

Elasticsearch 7 introduced a redesigned cluster coordination layer inspired by well-known consensus ideas. The cluster now manages its own voting configuration and adjusts it as nodes come and go, so the manual quorum setting disappeared.

3

Voting-only nodes arrive

Later in the 7.x line, the voting-only role was added, giving operators an official way to place cheap tiebreakers, especially for clusters that span two zones.

4

Roles become first-class settings

Later versions unified node configuration under a single roles list, so a dedicated tiebreaker is written as a short list of two roles.

The new system solved the counting problem, but a physical problem remained. Real companies often run in two data centres or two cloud zones, and adding a full third master-eligible node in a third place can be expensive or awkward. The voting-only role answers that exact situation: the third site needs to hold a vote, not a heavy workload.

i
Practical tip

If you read old articles that mention setting the minimum master nodes by hand, remember they describe an older design. Modern versions manage the voting configuration for you, and your job is to place the right kinds of nodes in the right places.

7Internal Working: How an Election Really Happens

Inside the cluster, elections follow a careful, polite protocol.

When a cluster starts, or when the current master disappears, master-eligible nodes begin looking for a leader. A node that finds no leader waits a short random time, then decides whether to try to become one. The random delay is important: it stops every node from running for leader at the same instant and splitting the vote again and again.

flowchart TD
    A["Node notices no leader is available"] --> B["Node is electable, meaning master role without voting_only"]
    B -->|Yes| C["Wait a short random delay"]
    B -->|No, voting-only| V["Stay quiet and wait to be asked for a vote"]
    C --> D["Ask other master-eligible nodes if they would vote for me"]
    D --> E{"Did a majority of the voting configuration say yes?"}
    E -->|Yes| F["Become elected master and publish first cluster state"]
    E -->|No| G["Back off and try again later"]
    V --> H["Voting-only node answers requests using the same rules as everyone else"]
    H --> D
        
FIG 1 — Election flow, with the voting-only node answering but never asking

Step by step

First, an electable node sends a lightweight check to peers, sometimes described as a pre-vote, to learn whether an election could succeed before it disturbs the cluster. If enough peers answer positively, it starts a real election in a new numbered round called a term. Each voter gives at most one vote in each term. The candidate that collects a majority of the voting configuration wins.

A voter only supports a candidate whose knowledge of the cluster is at least as fresh as its own. This protects committed changes from being forgotten. A voting-only node applies precisely the same tests as any other voter. It stores the same information about the last committed cluster state and refuses candidates who would roll history backwards.

Timing settings you may meet

A handful of settings control how patient nodes are. The election initial timeout, back-off time, maximum timeout and election duration decide how long a node waits and how quickly it retries. Their defaults are tuned for ordinary networks and rarely need change. The documentation warns that lowering them on a slow or unreliable network can cause repeated failed elections, so leave them alone unless you have measured a real problem.

i
Key insight

The only place where voting-only nodes differ from other master-eligible nodes is the very first decision: whether to stand for election. After that, they behave exactly like every other voter.

!
Common mistake

Some teams shorten election timeouts hoping to speed up failover. On congested or cross-zone links this often causes leaders to be replaced needlessly, which is worse than waiting a second longer. Measure before tuning.

8What a Voting-Only Node Does, and What It Refuses to Do

A clear list of duties makes the design easy to remember.

ActivityVoting-only nodeNormal master-eligible node
Votes in electionsYesYes
Stands as a candidate for leaderNeverYes
Can become the elected masterNeverYes
Counts toward quorum when cluster changes are confirmedYesYes
Receives and stores the cluster stateYesYes
Decides shard placementNo, only the elected master doesOnly while it is the elected master
Stores index dataOnly if you also give it a data roleOnly if you also give it a data role

It still holds a copy of the plan

A voting-only node is not an empty shell. It receives every cluster state update and writes it to its own disk, just like any other master-eligible node. It has to, because a voter that cannot remember the last committed decision cannot safely vote. This is why even the smallest tiebreaker needs a reliable local disk that survives restarts, and enough memory to hold the cluster state comfortably.

It carries the same fault detection duties

Nodes in the cluster constantly check each other. The elected master checks that followers are alive, and followers check that the master is alive. A voting-only node participates in this checking as a follower. If it stops hearing from the master, it helps the cluster notice that the master has gone.

Simple Analogy

Think of a neutral witness who signs every official document but never writes one. The witness keeps a copy of each signed paper in a cupboard, so that if any dispute arises, the witness can say which paper was the last agreed one.

i
Design hint

The two most important words about voting-only nodes are “small” and “steady”. They should be cheap to run and extremely reliable, because their whole reason to exist is to be there when it matters.

9Publishing Cluster State: Where Votes Matter Every Day

Elections are rare, but confirming changes happens constantly, and it needs votes every time.

Elections get most of the attention, but they are rare events. Most of the time the cluster has a stable master, and the daily work of the voting configuration is confirming changes. Every time the master wants to change the plan, for example after an index is created, it must publish the new cluster state and wait until a quorum of voters has accepted it.

sequenceDiagram
    participant M as Elected Master
    participant A as Electable Node
    participant T as Voting-only Node
    participant D as Data Nodes
    M->>A: Publish new cluster state
    M->>T: Publish new cluster state
    M->>D: Publish new cluster state
    A-->>M: Accepted and saved
    T-->>M: Accepted and saved
    M->>M: Quorum reached, change is committed
    M->>A: Commit
    M->>T: Commit
    M->>D: Commit
    D-->>M: Applied
        
FIG 2 — A cluster state change needs a quorum of voters, including voting-only nodes

Two phases: accept, then commit

In the first phase the master sends the proposed new plan. Each voter writes it to disk and replies that it has accepted it. Only when a majority of the voting configuration has replied does the master send a commit message, telling everyone the change is now official. This two-phase approach ensures that a change is never considered official unless a majority already has a durable copy.

Why this makes the tiebreaker important every day

Suppose a two-zone cluster has one electable node in each zone and a voting-only tiebreaker in a third place. When the second zone goes offline, the first zone plus the tiebreaker still form a majority of three, so cluster changes can continue. But note that every change must now be accepted by the tiebreaker as well. If the link to the tiebreaker is slow, cluster state changes become slow. A tiebreaker is small in size, but not unimportant in networking terms.

Phase 1
voters accept and save the change
Phase 2
master commits after a majority accepts
Every change
passes through this cycle
!
Watch out

If a required voter is slow, publication can stall until a timeout expires. The publish timeout and follower lag settings exist for this reason. Voting-only nodes on weak network paths are a common hidden cause of sluggish index creation and mapping updates.

10Configuring a Voting-Only Node

The configuration is short, but the rules around it matter.

You create a voting-only node by editing its configuration file and setting its roles list. A dedicated voting-only node carries exactly two roles: master and voting_only. Nothing else. Because it holds no data and serves no searches, it can run on a small machine.

Role combinationNameBehaviour
master and voting_onlyDedicated voting-only nodeVotes only, no data, best choice for a tiebreaker
master, voting_only and a data roleMixed voting-only data nodeStores data and votes, but never becomes leader
master onlyDedicated master-eligible nodeVotes and can be elected leader
voting_only without masterInvalidElasticsearch refuses to start the node

The role must be paired with master

The voting-only role has no meaning on its own. It restricts a master-eligible node, so it must always appear together with the master role. If you write voting_only without master, Elasticsearch stops with a configuration error instead of guessing what you meant, which is a helpful safety feature.

Dedicated versus mixed

Mixed nodes, which also hold data, are sometimes used in small clusters to save cost. For example, a small cluster may have two electable master and data nodes, plus one data node that also carries the voting-only flag. That gives three voters with only three machines. However, a busy data node can become slow under heavy indexing or long garbage collection, and a slow voter can delay every cluster state change. In serious production clusters, most teams prefer a dedicated voting-only node for the tiebreaker.

i
Practical tip

After changing roles and restarting a node, always confirm the result with the cat nodes API. The node list should show the master and voting-only letters exactly as you intended before you rely on it in a failure scenario.

!
Common mistake

Changing the roles of an existing node that already holds data is not a casual edit. Removing the data role, for example, requires moving shards away first. Plan role changes as a maintenance task, not as a quick fix, and read the official guidance on changing node roles.

11The Tiebreaker Pattern: Two Zones Plus One

The most famous use of a voting-only node is protecting a two-zone cluster.

Many organisations run in two places, such as two data centres or two availability zones. They want the cluster to survive the loss of either place. This is a hard problem for any voting system. If each zone holds one master-eligible node, there are two voters, and a quorum needs both. If one zone vanishes, the other zone has only half the votes, and no majority.

One workaround is to give one zone more master-eligible nodes than the other. That zone can then survive alone, but the cluster cannot survive the loss of that bigger zone. The complete solution is a third location that holds a single voting-only node.

graph TD
    subgraph ZA["Zone A"]
        A1["Electable master-eligible node"]
        A2["Data nodes"]
    end
    subgraph ZB["Zone B"]
        B1["Electable master-eligible node"]
        B2["Data nodes"]
    end
    subgraph ZC["Third location"]
        T["Dedicated voting-only tiebreaker"]
    end
    A1 --- B1
    A1 --- T
    B1 --- T
        
FIG 3 — Two zones with electable nodes, plus a tiny tiebreaker in a third place

What each failure looks like

What failsVoters still reachableOutcome
Nothing3 of 3Normal operation
The tiebreaker only2 of 3Cluster continues, but with less spare capacity
All of Zone A2 of 3, namely Zone B and tiebreakerZone B’s electable node becomes leader and the cluster continues
All of Zone B2 of 3, namely Zone A and tiebreakerZone A’s electable node leads and the cluster continues
The network link between Zone A and Zone BEach zone reaches the tiebreakerThe tiebreaker’s vote can only go to one side, so only one side gets a majority
Zone A and the tiebreaker together1 of 3No majority, the cluster cannot elect a leader until one returns

The fifth row is the most beautiful. During a network partition, both zones are alive and think the other is dead. In a system without a tiebreaker, both might try to lead. With the tiebreaker, only one side can gain the third vote, so only one side is allowed to continue changing the cluster state. The other side pauses safely instead of creating a second version of history.

Simple Analogy

Two rival shops share a warehouse key kept by a neutral neighbour. During a quarrel, the neighbour hands the key to only one shop. The other shop must wait, so the stock is never counted twice.

i
Why not a full third master?

A full master-eligible node in a third place could be elected leader. If that place is far away or weak, the whole cluster then depends on a distant, small machine for every change. Making it voting-only keeps leadership in the strong, well-connected zones while still gaining the vote.

12Failure Scenarios Walked Through Slowly

Following a real outage makes the design stick in memory.

Let us follow a cluster called Orders that runs in two cloud zones, Zone A and Zone B, with a tiny voting-only tiebreaker in Zone C. Zone A currently holds the elected master.

1

Zone A loses power

The elected master, and half of the data nodes, disappear at once. Nodes in Zone B and Zone C stop hearing from the leader.

2

Fault detection notices

After a few missed checks, followers declare the master gone. This takes some seconds, because the checks tolerate short hiccups before giving up.

3

The electable node in Zone B stands

It waits a short random delay, then asks for votes. The voting-only node in Zone C is reachable and answers yes.

4

Zone B wins two of three votes

Its own vote plus the tiebreaker’s vote make a majority. It becomes the new elected master and publishes a cluster state that marks Zone A nodes as gone.

5

Shards recover

The new master promotes replica shards in Zone B to primaries where needed, so searches and indexing continue, provided replicas were configured across zones.

6

Zone A returns

When power is restored, its nodes rejoin, learn the newer cluster state, and catch up. The tiebreaker never needed to move data or do heavy work.

!
Do not forget the data

A voting layer that survives a zone loss does not protect your data by itself. You also need replica shards and allocation rules that spread copies across zones. Voting keeps the cluster in control, replicas keep the documents alive.

“The tiebreaker does almost nothing all year, and everything on the one day it counts.”

13Sizing and Hardware

Small does not mean careless.

A dedicated voting-only node does not index documents, run searches, or hold shards. Its main memory use is the cluster state and the normal overhead of running the Java virtual machine. So its CPU needs are modest and its disk needs are small. The exact figures depend on how big your cluster state is, which grows with the number of indices, shards and fields, so size the machine from your real cluster state rather than from a fixed rule.

Resource 1

Memory

Enough heap to hold the full cluster state with generous room. Very large clusters with many shards need a bigger heap even for a tiebreaker.

Resource 2

CPU

Low, but not zero. It must process cluster state updates promptly, so avoid heavily shared or throttled machines.

Resource 3

Disk

A small but durable disk. It stores the cluster metadata, and it must survive restarts with its contents intact.

Resource 4

Network

Stable and low-latency to the electable nodes. This is often the most important resource for a tiebreaker.

Why the disk must be durable

A voter must remember its last commitments. If a tiebreaker restarts on a fresh empty disk, it has forgotten what it promised. Elasticsearch has protections, but losing the data path of master-eligible nodes can lead to an unrecoverable cluster in the worst cases. In containers and cloud instances, mount a persistent volume for the data path of every master-eligible node, including voting-only nodes.

!
Common mistake

Running the tiebreaker as a throw-away container that starts with an empty disk each time. A tiebreaker should be boring and stable, with a persistent volume and a controlled replacement process.

i
Practical tip

Monitor the tiebreaker’s heap use as your cluster grows. A design that fits comfortably with two hundred indices can struggle with twenty thousand shards, and the tiebreaker is the machine people forget to resize.

14Networking, Latency and Placement

Where you put the tiebreaker matters as much as how you configure it.

A good tiebreaker lives in a separate failure domain. That means it should not share power, network switches, or a cloud zone with either of the main zones. If the tiebreaker sits in Zone A next to an electable node, then losing Zone A removes two of three votes, and the design has protected nothing.

Latency limits

Elasticsearch documentation assumes master-eligible nodes can talk to each other reliably and quickly. When a leader publishes a change, it waits for a quorum of voters. If the tiebreaker is far away, every change waits for round trips to it in the one scenario where its vote is needed. A tiebreaker in a different city may be acceptable on a stable private link, but a tiebreaker on an unreliable internet path is dangerous.

Rule 1

Separate failure domain

Different zone, rack or site from both electable nodes.

Rule 2

Stable link

Prefer a private, monitored link over the open internet.

Rule 3

Encrypted transport

Use transport-layer encryption between all nodes, including the tiebreaker.

Rule 4

Predictable addresses

Give it a stable name or address so the other nodes can always find it.

Firewalls and discovery

The tiebreaker must be reachable on the cluster’s transport port from every other master-eligible node. New nodes find the cluster through a list of seed hosts, and the tiebreaker should appear there if it is one of the stable master-eligible nodes. Firewall mistakes are a frequent cause of one-directional connectivity, where the tiebreaker can reach others but they cannot reach it, producing confusing election failures.

i
Test before you trust

Before production, rehearse the failure. Stop the nodes in one zone in a test cluster and confirm that the surviving zone plus the tiebreaker elects a leader. Also cut the network between zones and confirm that only one side continues.

15Managing the Voting Configuration Over Time

Clusters change. Nodes join, leave and get replaced, and the voting list must follow safely.

The voting configuration is the list of nodes whose votes count. Elasticsearch adjusts it automatically as master-eligible nodes join and leave, so long as you make changes gently. It aims to keep the number of voters odd, and by default it can shrink the list when nodes depart, through a setting called auto shrink voting configuration. Because of this automation, you rarely edit the list by hand.

Adding a tiebreaker to a running cluster

To add a new voting-only node, start it with the master and voting_only roles and point it at the cluster’s seed hosts. When it joins, the cluster notices a new master-eligible node and can include it in the voting configuration. Then check the node list to confirm the roles, and check the cluster state’s coordination information to confirm it is a voter.

Removing or replacing master-eligible nodes

Removing master-eligible nodes carelessly is dangerous, because too many departures at once can leave the survivors without a majority of the old configuration. Elasticsearch offers the voting configuration exclusions API. You tell the cluster which node you are about to remove, the cluster moves the node out of the voting list first, and only then do you shut it down. After the removal, you clear the exclusion list.

1

Add the replacement first

Start the new node so that the cluster has spare voters before any old voter leaves.

2

Exclude the old node

Use the voting exclusions API to tell the cluster to stop counting the old node as a voter.

3

Wait for a stable cluster

Confirm the cluster is healthy and a master is elected, then shut the old node down.

4

Clear the exclusion

Remove the exclusion record so the list does not grow stale.

!
Danger zone

Never stop half or more of the master-eligible nodes at the same time, unless you are following an official procedure that accounts for the voting configuration. A sudden loss of a majority means the cluster cannot elect a leader until enough of them return.

i
Upgrade tip

During rolling upgrades, follow the official order and keep a majority of voters healthy at every moment. Tiebreakers must be upgraded too, and are typically handled in the master-eligible stage of the upgrade. Check the upgrade guide for your specific version.

16Real-World Examples

The same small idea appears in very different environments.

A retail company with two data centres

An online retailer keeps search and order analytics in two on-premises data centres. Each has one electable master-eligible node and a set of data nodes. A tiny virtual machine in a third office network runs as the dedicated voting-only tiebreaker. When one data centre loses power during a storm, the other continues serving customers with search and recommendations still working.

A bank with two cloud zones and a strict recovery goal

A bank’s log analytics platform spreads across two cloud availability zones for resilience. The security team requires that a single zone outage must not stop investigations. They add a small dedicated voting-only node in a third zone, and rehearse zone failures every quarter as part of their disaster recovery testing.

A hosted Elasticsearch service

Managed Elasticsearch offerings commonly add a tiebreaker automatically when a deployment spans two zones. Users see their data nodes in two zones, while the provider places a small extra voting node in a third. This is the same pattern described in this tutorial, made invisible to the customer.

A Kubernetes deployment

A platform team runs Elasticsearch on Kubernetes with separate node groups for masters, data and tiebreaker. The voting-only pods are scheduled into a third zone using placement rules, with persistent volumes attached, so that a zone failure never removes two voters at once.

A small cluster saving cost

A start-up runs three machines in total. Two are electable master and data nodes. The third is a data node that also carries the voting-only role, giving three voters without buying a dedicated machine. They accept the trade-off because the workload is light and they keep an eye on that third node’s health.

A telecom log platform across regions

A telecom operator collects network logs in two regions. Because latency between regions is high, they keep the electable nodes within each region well connected and place the voting-only node in a well-connected neutral site with a private line. This lets them survive the loss of an entire region without a manual recovery.

Retail
survive a data centre outage
Banking
rehearse zone failure every quarter
Telecom
tiebreaker on a private neutral link

17Choosing Between Layouts

A voting-only node is one option among several, and each layout has its place.

LayoutVotersZones neededSurvives loss ofComment
Single master-eligible node11NothingOnly for learning and testing
Three full master-eligible nodes in three zones33Any one zoneThe ideal, if three zones are available
Two electable nodes plus a voting-only tiebreaker33 locations, one may be smallAny one locationThe standard answer for two main zones
Two electable nodes in two zones, no tiebreaker22Nothing safelyA trap: looks resilient, is not
Unequal masters, such as two in Zone A and one in Zone B32Zone B onlyPartial protection, Zone A loss is fatal
Five master-eligible nodes with one or two voting-only53 or moreAny two nodesFor very large or critical clusters

When a full third master is better

If you truly have three healthy zones with good connectivity, three full master-eligible nodes are simpler. Any of them can lead, and there is no special role to explain to new colleagues. The voting-only node shines when the third location is weaker, remote or expensive, so that you want a vote there but not a leader.

When a voting-only node is the wrong tool

A voting-only node will not add search capacity, will not add storage, and will not help a cluster that has only one location. It also does not replace replicas. Think of it as a specialist for coordination, not a general performance upgrade.

i
Decision shortcut

Two strong zones and one weak third location: use a dedicated voting-only node in the third. Three strong zones: use three full master-eligible nodes. One zone only: a tiebreaker cannot help against a zone failure, so use several electable nodes across racks.

18Security Considerations

A tiebreaker holds a vote, and a vote can be abused, so protect it.

Because every voter influences which node becomes the leader, a compromised voting-only node is a real risk, even though it stores no index data. An attacker who controls a voter could disturb elections, delay cluster state changes or read the cluster state, which contains index names, mappings and node addresses. Treat the tiebreaker with the same discipline as any other master-eligible node.

Control 1

Transport encryption

Enable encryption and mutual certificate checks between all nodes so an unknown machine cannot join and vote.

Control 2

Network isolation

Allow the transport port only from known cluster addresses. Never expose it to the open internet.

Control 3

Host hardening

Keep the operating system patched, remove unused services and restrict administrator logins on the tiebreaker.

Control 4

Certificate hygiene

Track certificate expiry dates. An expired certificate on the tiebreaker can silently remove a voter.

!
Hidden risk

Expired certificates are a classic cause of surprise outages. The tiebreaker rarely gets attention, so its certificate is often the last one anyone renews. Include it in every certificate rotation and in your expiry alerts.

Disk encryption on the tiebreaker is also sensible, since its data path contains cluster metadata. Finally, keep clear records of who may change the roles of master-eligible nodes. Changing a node’s role from voting-only to a full master, or the reverse, changes the election rules of the entire cluster.

19Monitoring, Logging and Metrics

You should know a voter is missing before the day you need it.

The tiebreaker’s value lies in being available at the worst moment, so you need to know quietly, in advance, whether it is healthy. Combine simple node-level monitoring with cluster-level checks.

SignalWhere to lookWhat it tells you
Node present with the right role lettersCat nodes APIThe tiebreaker is joined and has the master and voting-only roles
Current elected masterCat master API and the node list asteriskLeadership is stable and on an electable node
Frequent master changesElasticsearch logs on master-eligible nodesNetwork trouble or overloaded leaders
Master not discovered messagesLogs and API errorsThe cluster has lost its majority or connectivity
Slow cluster state publicationLogs mentioning publication delaysA slow voter, possibly the tiebreaker link
Heap use on the tiebreakerNode stats or an external monitorWhether cluster state growth is outpacing its memory
Certificate expiryExternal certificate monitoringAdvance warning of voter loss
Master stability indicatorHealth report API in recent versionsA summary of whether leadership is stable

Alerts worth having

Alert 1

Voter count below expected

Alert when the number of master-eligible nodes in the cluster drops below the number you designed for.

Alert 2

Repeated elections

Alert when the elected master changes more than a couple of times in an hour.

Alert 3

Tiebreaker unreachable

Alert on any network probe failure between the tiebreaker and each electable node.

Alert 4

Certificate expiry near

Alert weeks ahead, not days, so the fix can happen during working hours.

i
Operations tip

Treat losing the tiebreaker as an incident of medium urgency, even though the cluster keeps working. You have silently lost your protection against the next failure, and the time to restore it is before that failure arrives.

20Design Patterns and Anti-Patterns

Habits that keep clusters safe, and traps that catch careful teams.

Patterns worth copying

Pattern 1

Two electable plus one tiebreaker

The classic three-voter layout across two main zones and one small third location.

Pattern 2

Dedicated masters for large clusters

Keep leader-capable nodes free of data work so that leadership stays responsive.

Pattern 3

Zone-aware shard allocation

Combine voting design with allocation rules so replicas live in a different zone from their primaries.

Pattern 4

Rehearsed failure drills

Practise zone loss and partitions on a schedule so the design is proven, not assumed.

Pattern 5

Infrastructure as code for roles

Keep node roles in version-controlled templates so a replacement tiebreaker is created identically.

Pattern 6

Persistent volumes everywhere

Give every master-eligible node, including the tiebreaker, a durable data path.

Anti-patterns to avoid

ANTI-PATTERN-01 Avoid
Problem

Two zones each hold one electable master-eligible node and nothing else votes. The team believes the cluster is highly available because there are two of everything.

Why It’s Harmful

Two voters need both to agree. Losing either zone, or the link between them, leaves the survivors without a majority, so the cluster stops accepting cluster changes exactly when it needs to recover.

Correct Approach

Add a dedicated voting-only tiebreaker in a third failure domain so that a majority always exists after any single-location failure.

ANTI-PATTERN-02 Avoid
Problem

The team marks most master-eligible nodes as voting-only to keep them “safe from leadership”, leaving just one electable node.

Why It’s Harmful

That single electable node is a single point of failure. If it dies, nobody can stand for election, even though many voters remain online, and the cluster cannot heal.

Correct Approach

Keep at least two electable master-eligible nodes in production, and use voting-only status only for extra voters and tiebreakers.

ANTI-PATTERN-03 Avoid
Problem

The tiebreaker is placed in the same zone, rack or hypervisor as one of the electable nodes because it was convenient.

Why It’s Harmful

When that place fails, two of three voters disappear together. The design looks correct on a diagram but has no real independence.

Correct Approach

Place the tiebreaker in a truly separate failure domain, and verify it with an actual failure test.

ANTI-PATTERN-04 Avoid
Problem

A tiny disposable container with no persistent storage runs the tiebreaker, and it is replaced freely whenever it misbehaves.

Why It’s Harmful

A voter that forgets its history can weaken the safety guarantees, and careless replacement of voters can leave the cluster without a majority.

Correct Approach

Give the tiebreaker durable storage and replace it with the same care as any master-eligible node, using the voting exclusions process.

21Advantages and Trade-offs

A fair look at what the voting-only role gives you and what it costs.

Advantages

  • Provides a majority vote in a third location without the cost of a full-sized master.
  • Makes two-zone clusters able to survive the loss of either zone.
  • Prevents a weak or distant node from ever becoming the leader.
  • Needs little CPU and no shard storage when dedicated.
  • Uses the same software and the same operations tools as every other node.
  • Keeps the number of voters odd, which removes deadlocks in elections.

Disadvantages / Trade-offs

  • Adds another machine to secure, patch, monitor and pay for.
  • Depends on a reliable network path to the electable nodes.
  • Is not a substitute for replicas or zone-aware shard allocation.
  • Cannot rescue a cluster that has only one electable node left.
  • Still needs enough memory and a durable disk for the cluster state.
  • Requires the default distribution of Elasticsearch rather than an open-source-only build.

22Best Practices and Common Mistakes

A checklist worth pinning near the operations desk.

Best practices

1

Keep the voter count odd

Three or five voters cover most needs. Avoid designs where a plain majority is impossible after one failure.

2

Keep at least two electable nodes

Make sure leadership always has a candidate even after one node fails.

3

Use a dedicated tiebreaker

A voting-only node with nothing else to do is easier to size, monitor and reason about than a busy data node with a voting flag.

4

Separate the failure domain

Put the tiebreaker where neither main zone’s failure can touch it.

5

Persist and protect its data path

Use a durable volume, encrypt it, and never wipe it casually.

6

Rehearse the failure

Run zone-loss and partition drills, and record how long recovery takes.

7

Use exclusions when removing voters

Follow the documented exclusion process instead of simply switching machines off.

Common mistakes

Believing the tiebreaker stores backups of data

A voting-only node holds cluster metadata, not your documents. It gives no data protection at all.

Forgetting to size for cluster state growth

As shards multiply, the cluster state grows. A tiebreaker sized on day one may be too small a year later.

Ignoring one-way network problems

A firewall rule that allows traffic in one direction only can produce strange election failures that look like software bugs.

Changing timeouts before measuring

Shortening election and fault-detection timeouts on a noisy network often worsens stability.

Assuming managed services need no understanding

Even when a provider places the tiebreaker for you, you still need to know what it does so you can read incident reports and plan capacity.

23Troubleshooting Voting Problems

When the cluster says it has no master, work through causes in a calm order.

SymptomLikely causeWhat to check
Cluster reports no master after a zone lossThe surviving side lacks a majority, often because there was no tiebreaker or it was in the failed zoneCount reachable master-eligible nodes against the voting configuration
Voting-only node refuses to startThe voting-only role was set without the master roleRead the startup error and the roles setting
Tiebreaker is up but not countedIt has not joined the cluster, or certificates or firewalls block itCheck the node list and transport connectivity from every electable node
Leader keeps changingUnstable network, overloaded electable nodes or long pausesLook at logs for fault detection and garbage collection pauses
Cluster state updates are slowA voter on a slow link or a struggling machineCheck publication messages and the latency to the tiebreaker
Cluster will not form after replacing a voterToo many voters were lost at once, or a data path was wipedFollow the official recovery guidance, using the node tool only as a last resort
The wrong node is electedExpected candidate is actually voting-only, or has a weaker cluster stateVerify role letters and recent state on each master-eligible node

A calm routine

Start with the simplest question: which master-eligible nodes can talk to each other right now? Draw the picture on paper, marking zones, links and roles. Then count votes against the voting configuration. Only after you understand the vote count should you look at timeouts and performance. Most “mystery” election problems turn out to be either a missing voter, a blocked network path, or a wrong role.

!
Last resort tools

Elasticsearch ships an offline node tool that can, in extreme cases, rewrite cluster coordination data to recover from lost majorities. It can cause data loss, and should be used only after reading the official guidance and only when normal recovery is impossible.

24Frequently Asked Questions

Short answers to doubts that come up again and again.

Q1Can a voting-only node ever become the master?

No. It votes in elections and helps confirm cluster changes, but it never stands as a candidate, so it cannot be elected.

Q2Does it store my index data?

Not when it is dedicated. It stores the cluster state, which describes the cluster. If you give it a data role as well, it will store shards, but then it is no longer a light tiebreaker.

Q3Can I have a cluster made only of voting-only master-eligible nodes?

No. At least one electable master-eligible node is needed for any leader to exist, and for resilience you should keep at least two.

Q4Is a tiebreaker useful in a single-zone cluster?

It can help keep voter counts odd, but it does not protect against a zone failure since there is only one zone. Its real power appears in multi-location layouts.

Q5How small can the tiebreaker machine be?

It can be much smaller than a data node, but it must hold the whole cluster state in memory and keep a durable disk. Size it from your real cluster state, and revisit the size as the cluster grows.

Q6What happens if the tiebreaker goes down?

The cluster continues as long as the remaining voters still form a majority. But you have lost your protection against the next failure, so restore it quickly.

Q7What is the difference between a voting-only node and a coordinating-only node?

A coordinating-only node routes search and indexing requests and has no vote. A voting-only node takes part in elections and cluster state commits and does not handle client requests unless you give it other roles.

Q8Do I need to set the quorum size by hand?

Not in modern versions. Elasticsearch manages the voting configuration itself. Your job is to choose sensible numbers and locations of master-eligible nodes.

Q9Can I run more than one voting-only node?

Yes. Larger clusters may use several, for example in a five-voter layout. Just remember that enough electable nodes must always remain.

Q10Does a voting-only node need the same security setup as other nodes?

Yes. It participates in cluster coordination, so it needs the same transport encryption, certificates, network rules and patching as any other master-eligible node.

Q11How do I confirm that a node is voting-only?

Check the cat nodes API. Master-eligible nodes show the letter for master, and voting-only nodes also show the letter v in their role column.

Q12Do managed Elasticsearch services handle this for me?

Many managed services add tiebreaker nodes automatically for multi-zone deployments. You should still learn the concept, so you understand what the provider is protecting and what your own responsibilities are, such as replicas and allocation.

25Summary and Key Takeaways

A voting-only node is a master-eligible node that promises never to lead. It exists so that a cluster can gain the safety of an extra vote, especially in a third failure domain, without paying for a full-sized master. It votes in elections, accepts and commits cluster state changes, and keeps a copy of the cluster state, yet it never asks to be the boss. Combined with two electable master-eligible nodes in two main zones, it forms the standard layout that survives the loss of any one location and prevents split brain. Its success depends on good placement, a stable network, a durable disk, tight security and regular rehearsal.

Key Takeaways

  • Vote without leading — a voting-only node has the master and voting_only roles, votes in elections and commits, and can never be elected master.
  • Quorum is the foundation — a majority of the voting configuration must agree on every leader and every cluster state change, so odd voter counts work best.
  • Two zones plus a tiebreaker — one electable node in each main zone and a dedicated voting-only node in a third failure domain survives any single-location failure.
  • Keep two electable nodes — votes alone cannot run a cluster, so always retain at least two nodes that can actually become master.
  • Small but not careless — the tiebreaker needs enough memory for the cluster state, a durable disk, encrypted transport and a stable network.
  • Change voters carefully — use the voting exclusions process, never remove a majority of master-eligible nodes at once, and follow upgrade guidance.
  • Monitor and rehearse — watch voter counts, master changes and certificate expiry, and practise zone-loss drills so the design is proven before it is needed.