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.
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.
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
Node
One running copy of Elasticsearch on one machine, container or virtual machine. It is one member of the team.
Master-eligible node
A node allowed to vote in elections and, unless it is voting-only, allowed to be elected leader.
Elected master
The one node currently chosen as leader. It manages the cluster state. Also called the active master.
Quorum
The smallest number of votes that counts as a majority. For a group of size n it is more than half of n.
Voting configuration
The current list of master-eligible nodes whose votes count. Elasticsearch keeps this list up to date automatically.
Tiebreaker
An extra voter placed so that ties and even splits cannot happen. A dedicated voting-only node is the classic tiebreaker.
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.
Cluster state
The shared plan of the cluster: indices, mappings, settings, node list and shard locations.
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.
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.
| Role | What it does | Everyday comparison |
|---|---|---|
| master | Makes the node eligible to vote in elections, and to be elected leader | A member of the village council |
| voting_only | Together with master, lets the node vote but never lead | A council member who refuses to be chairperson |
| data and data tiers | Stores shards and answers search and indexing work | A warehouse holding the goods |
| ingest | Runs pipelines that transform documents before storing them | A packing station at the warehouse door |
| ml | Runs machine learning jobs | A specialist analysis lab |
| transform | Runs transforms that summarise data | An accountant producing summary sheets |
| remote_cluster_client | Connects to other clusters | An ambassador to another village |
| Coordinating only (no roles) | Receives requests, fans them out and gathers answers | A 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.
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.
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.
Creating and deleting indices
When someone creates an index, the master records it in the plan and decides where each shard will live.
Tracking nodes
The master notes which nodes join or leave and reacts, for example by rebuilding lost shard copies elsewhere.
Allocating shards
It assigns primary and replica shards to nodes and moves them to keep the cluster balanced.
Updating mappings and settings
When a new field appears or a setting changes, the master writes the change and shares it.
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”.
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 configuration | Votes needed (quorum) | Voters you can lose and still decide |
|---|---|---|
| 1 | 1 | 0 |
| 2 | 2 | 0 |
| 3 | 2 | 1 |
| 4 | 3 | 1 |
| 5 | 3 | 2 |
| 7 | 4 | 3 |
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
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.
| Activity | Voting-only node | Normal master-eligible node |
|---|---|---|
| Votes in elections | Yes | Yes |
| Stands as a candidate for leader | Never | Yes |
| Can become the elected master | Never | Yes |
| Counts toward quorum when cluster changes are confirmed | Yes | Yes |
| Receives and stores the cluster state | Yes | Yes |
| Decides shard placement | No, only the elected master does | Only while it is the elected master |
| Stores index data | Only if you also give it a data role | Only 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.
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.
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
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.
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 combination | Name | Behaviour |
|---|---|---|
| master and voting_only | Dedicated voting-only node | Votes only, no data, best choice for a tiebreaker |
| master, voting_only and a data role | Mixed voting-only data node | Stores data and votes, but never becomes leader |
| master only | Dedicated master-eligible node | Votes and can be elected leader |
| voting_only without master | Invalid | Elasticsearch 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.
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.
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
What each failure looks like
| What fails | Voters still reachable | Outcome |
|---|---|---|
| Nothing | 3 of 3 | Normal operation |
| The tiebreaker only | 2 of 3 | Cluster continues, but with less spare capacity |
| All of Zone A | 2 of 3, namely Zone B and tiebreaker | Zone B’s electable node becomes leader and the cluster continues |
| All of Zone B | 2 of 3, namely Zone A and tiebreaker | Zone A’s electable node leads and the cluster continues |
| The network link between Zone A and Zone B | Each zone reaches the tiebreaker | The tiebreaker’s vote can only go to one side, so only one side gets a majority |
| Zone A and the tiebreaker together | 1 of 3 | No 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
CPU
Low, but not zero. It must process cluster state updates promptly, so avoid heavily shared or throttled machines.
Disk
A small but durable disk. It stores the cluster metadata, and it must survive restarts with its contents intact.
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.
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.
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.
Separate failure domain
Different zone, rack or site from both electable nodes.
Stable link
Prefer a private, monitored link over the open internet.
Encrypted transport
Use transport-layer encryption between all nodes, including the tiebreaker.
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.
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.
Add the replacement first
Start the new node so that the cluster has spare voters before any old voter leaves.
Exclude the old node
Use the voting exclusions API to tell the cluster to stop counting the old node as a voter.
Wait for a stable cluster
Confirm the cluster is healthy and a master is elected, then shut the old node down.
Clear the exclusion
Remove the exclusion record so the list does not grow stale.
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.
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.
17Choosing Between Layouts
A voting-only node is one option among several, and each layout has its place.
| Layout | Voters | Zones needed | Survives loss of | Comment |
|---|---|---|---|---|
| Single master-eligible node | 1 | 1 | Nothing | Only for learning and testing |
| Three full master-eligible nodes in three zones | 3 | 3 | Any one zone | The ideal, if three zones are available |
| Two electable nodes plus a voting-only tiebreaker | 3 | 3 locations, one may be small | Any one location | The standard answer for two main zones |
| Two electable nodes in two zones, no tiebreaker | 2 | 2 | Nothing safely | A trap: looks resilient, is not |
| Unequal masters, such as two in Zone A and one in Zone B | 3 | 2 | Zone B only | Partial protection, Zone A loss is fatal |
| Five master-eligible nodes with one or two voting-only | 5 | 3 or more | Any two nodes | For 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.
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.
Transport encryption
Enable encryption and mutual certificate checks between all nodes so an unknown machine cannot join and vote.
Network isolation
Allow the transport port only from known cluster addresses. Never expose it to the open internet.
Host hardening
Keep the operating system patched, remove unused services and restrict administrator logins on the tiebreaker.
Certificate hygiene
Track certificate expiry dates. An expired certificate on the tiebreaker can silently remove a voter.
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.
| Signal | Where to look | What it tells you |
|---|---|---|
| Node present with the right role letters | Cat nodes API | The tiebreaker is joined and has the master and voting-only roles |
| Current elected master | Cat master API and the node list asterisk | Leadership is stable and on an electable node |
| Frequent master changes | Elasticsearch logs on master-eligible nodes | Network trouble or overloaded leaders |
| Master not discovered messages | Logs and API errors | The cluster has lost its majority or connectivity |
| Slow cluster state publication | Logs mentioning publication delays | A slow voter, possibly the tiebreaker link |
| Heap use on the tiebreaker | Node stats or an external monitor | Whether cluster state growth is outpacing its memory |
| Certificate expiry | External certificate monitoring | Advance warning of voter loss |
| Master stability indicator | Health report API in recent versions | A summary of whether leadership is stable |
Alerts worth having
Voter count below expected
Alert when the number of master-eligible nodes in the cluster drops below the number you designed for.
Repeated elections
Alert when the elected master changes more than a couple of times in an hour.
Tiebreaker unreachable
Alert on any network probe failure between the tiebreaker and each electable node.
Certificate expiry near
Alert weeks ahead, not days, so the fix can happen during working hours.
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
Two electable plus one tiebreaker
The classic three-voter layout across two main zones and one small third location.
Dedicated masters for large clusters
Keep leader-capable nodes free of data work so that leadership stays responsive.
Zone-aware shard allocation
Combine voting design with allocation rules so replicas live in a different zone from their primaries.
Rehearsed failure drills
Practise zone loss and partitions on a schedule so the design is proven, not assumed.
Infrastructure as code for roles
Keep node roles in version-controlled templates so a replacement tiebreaker is created identically.
Persistent volumes everywhere
Give every master-eligible node, including the tiebreaker, a durable data path.
Anti-patterns to 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.
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.
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.
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
Keep the voter count odd
Three or five voters cover most needs. Avoid designs where a plain majority is impossible after one failure.
Keep at least two electable nodes
Make sure leadership always has a candidate even after one node fails.
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.
Separate the failure domain
Put the tiebreaker where neither main zone’s failure can touch it.
Persist and protect its data path
Use a durable volume, encrypt it, and never wipe it casually.
Rehearse the failure
Run zone-loss and partition drills, and record how long recovery takes.
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.
| Symptom | Likely cause | What to check |
|---|---|---|
| Cluster reports no master after a zone loss | The surviving side lacks a majority, often because there was no tiebreaker or it was in the failed zone | Count reachable master-eligible nodes against the voting configuration |
| Voting-only node refuses to start | The voting-only role was set without the master role | Read the startup error and the roles setting |
| Tiebreaker is up but not counted | It has not joined the cluster, or certificates or firewalls block it | Check the node list and transport connectivity from every electable node |
| Leader keeps changing | Unstable network, overloaded electable nodes or long pauses | Look at logs for fault detection and garbage collection pauses |
| Cluster state updates are slow | A voter on a slow link or a struggling machine | Check publication messages and the latency to the tiebreaker |
| Cluster will not form after replacing a voter | Too many voters were lost at once, or a data path was wiped | Follow the official recovery guidance, using the node tool only as a last resort |
| The wrong node is elected | Expected candidate is actually voting-only, or has a weaker cluster state | Verify 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.
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.
No. It votes in elections and helps confirm cluster changes, but it never stands as a candidate, so it cannot be elected.
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.
No. At least one electable master-eligible node is needed for any leader to exist, and for resilience you should keep at least two.
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.
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.
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.
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.
Not in modern versions. Elasticsearch manages the voting configuration itself. Your job is to choose sensible numbers and locations of master-eligible nodes.
Yes. Larger clusters may use several, for example in a five-voter layout. Just remember that enough electable nodes must always remain.
Yes. It participates in cluster coordination, so it needs the same transport encryption, certificates, network rules and patching as any other master-eligible node.
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.
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.