# What happens if i run more yb master nodes than the replication factor

**URL:** <https://forum.yugabyte.com/t/what-happens-if-i-run-more-yb-master-nodes-than-the-replication-factor/4100>\
**Category:** General\
**Created:** [December 31, 2024, 11:38am UTC](https://forum.yugabyte.com/t/what-happens-if-i-run-more-yb-master-nodes-than-the-replication-factor/4100 "2024-12-31T11:38:02Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manish](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Manish](https://forum.yugabyte.com/u/Manish)\
**Post date:** [December 31, 2024, 11:38am UTC](https://forum.yugabyte.com/t/what-happens-if-i-run-more-yb-master-nodes-than-the-replication-factor/4100/1 "2024-12-31T11:38:02Z")

</div>

I am trying to setup Yugabyte and was writing automation to setup a cluster.  
The automation would become a bit complicated if had to manage master vms and tserver vms separately, setting up automation to bring up both master and tserver nodes on the same machine is straightforward.

The issue I am wondering about is what if i need a cluster with 7 tservers and also bring up 7 master servers along with them and create a cluster. [Replication Factor - 3]  
All documentation i have come across just mentions that you should have master nodes equal to RF. what happens if i maintain a larger number of master nodes. what will go wrong (or any potential issues that might come up)?

---

<div class="post-metadata">

**Author:** ![dorian\_yugabyte](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.yugabyte.com/dorian_yugabyte/32/206_2.png) [@dorian\_yugabyte](https://forum.yugabyte.com/u/dorian_yugabyte)\
**Post date:** [January 8, 2025, 9:40am UTC](https://forum.yugabyte.com/t/what-happens-if-i-run-more-yb-master-nodes-than-the-replication-factor/4100/2 "2025-01-08T09:40:10Z")

</div>

Hi @Manish

How are you deploying? Using yugabyted?

---

<div class="post-metadata">

**Author:** ![Manish](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Manish](https://forum.yugabyte.com/u/Manish)\
**Post date:** [January 15, 2025, 12:41pm UTC](https://forum.yugabyte.com/t/what-happens-if-i-run-more-yb-master-nodes-than-the-replication-factor/4100/3 "2025-01-15T12:41:36Z")

</div>

Hi @dorian_yugabyte Deploying manually as mentioned here: [Manual deployment of YugabyteDB clusters | YugabyteDB Docs](https://docs.yugabyte.com/preview/deploy/manual-deployment/)

I am trying to setup deployment automation via chef cookbooks.

---

<div class="post-metadata">

**Author:** ![dorian\_yugabyte](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.yugabyte.com/dorian_yugabyte/32/206_2.png) [@dorian\_yugabyte](https://forum.yugabyte.com/u/dorian_yugabyte)\
**Post date:** [January 16, 2025, 9:56am UTC](https://forum.yugabyte.com/t/what-happens-if-i-run-more-yb-master-nodes-than-the-replication-factor/4100/4 "2025-01-16T09:56:15Z")

</div>

Currently yugabyted starts an yb-master in every node, more than RF. It keeps the yb-masters after RF not connected to the cluster and joins them when it sees that there are less than RF.

But we haven’t documented how it works so you have to look at [the source code](https://github.com/yugabyte/yugabyte-db/blob/master/bin/yugabyted) for now if you want to replicate.

---

<div class="post-metadata">

**Author:** ![Manish](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Manish](https://forum.yugabyte.com/u/Manish)\
**Post date:** [January 17, 2025, 3:50am UTC](https://forum.yugabyte.com/t/what-happens-if-i-run-more-yb-master-nodes-than-the-replication-factor/4100/5 "2025-01-17T03:50:14Z")

</div>

I understand that I will have to implement this myself in the cookbook.  
What I wanted to understand about more is why is there a need to restrict the number of masters equal to RF?  
What will go wrong if I run more masters than RF?  
I could not find answer to this anywhere.

---

<div class="post-metadata">

**Author:** ![dorian\_yugabyte](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.yugabyte.com/dorian_yugabyte/32/206_2.png) [@dorian\_yugabyte](https://forum.yugabyte.com/u/dorian_yugabyte)\
**Post date:** [January 20, 2025, 10:21am UTC](https://forum.yugabyte.com/t/what-happens-if-i-run-more-yb-master-nodes-than-the-replication-factor/4100/6 "2025-01-20T10:21:23Z")

</div>

> [@Manish](#):
>
> What I wanted to understand about more is why is there a need to restrict the number of masters equal to RF?

Because yb-masters form a RAFT cluster and handle replication/failover/consistency of the metadata (just like yb-tservers do for data).

---

<div class="post-metadata">

**Author:** ![dorian\_yugabyte](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.yugabyte.com/dorian_yugabyte/32/206_2.png) [@dorian\_yugabyte](https://forum.yugabyte.com/u/dorian_yugabyte)\
**Post date:** [January 20, 2025, 10:24am UTC](https://forum.yugabyte.com/t/what-happens-if-i-run-more-yb-master-nodes-than-the-replication-factor/4100/7 "2025-01-20T10:24:34Z")

</div>

Read [YB-Master service | YugabyteDB Docs](https://docs.yugabyte.com/preview/architecture/yb-master/) for more info.

---

<div class="post-metadata">

**Author:** ![FranckPachot](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.yugabyte.com/franckpachot/32/353_2.png) [@FranckPachot](https://forum.yugabyte.com/u/FranckPachot)\
**Post date:** [January 20, 2025, 5:05pm UTC](https://forum.yugabyte.com/t/what-happens-if-i-run-more-yb-master-nodes-than-the-replication-factor/4100/8 "2025-01-20T17:05:39Z")

</div>

Hi @Manish, You can start more yb-master if it makes your automation easier, but do not list more than the RF in `--master_addresses` and `tserver_master_addrs`. Because it will increase the replication factor of the yb-master’s tablet and slow down the writes to the yb-master (like DDL) because it will wait for the acknowledgment of the majority.

---

<div class="post-metadata">

**Author:** ![Benjiro](https://avatars.discourse-cdn.com/v4/letter/b/ecb155/32.png) [@Benjiro](https://forum.yugabyte.com/u/Benjiro)\
**Post date:** [March 23, 2025, 8:47pm UTC](https://forum.yugabyte.com/t/what-happens-if-i-run-more-yb-master-nodes-than-the-replication-factor/4100/9 "2025-03-23T20:47:22Z")

</div>

Just like OP, i did not have a clue that yugabyted will simply keep the T-Master higher then the RF(3), as hot standby.

This ties in to the Yugubyte Smart drivers, as they get updated with the promoted T-Masters. So if your not using the Smart drivers, multiple T-Master outage (lets say updating one by one the servers), may result in software losing access to the (retired) T-Masters (as now different T-masters are active). But this is not clearly communicated (imho) to use the smart drivers because of this behavior.

To be honest, a lot of information about Yugubyte, is rather confusing as its a mix of older T-Server/T-Master, and the newer yugabyted documentation.

Its one of those things that made me try CockroachDB first, as its installation was easier, where as Yugubyte goes down a entire path of T-Server, T-Masters, how many master, … and LLM’s do not pick yugabyted as the first option.

Note: Might be interesting to show this visually in the UI… Like Active Masters 3/3, Hot Spares 5/5.

---

<div class="post-metadata">

**Author:** ![dorian\_yugabyte](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.yugabyte.com/dorian_yugabyte/32/206_2.png) [@dorian\_yugabyte](https://forum.yugabyte.com/u/dorian_yugabyte)\
**Post date:** [March 24, 2025, 6:59am UTC](https://forum.yugabyte.com/t/what-happens-if-i-run-more-yb-master-nodes-than-the-replication-factor/4100/10 "2025-03-24T06:59:00Z")

</div>

> [@Benjiro](#):
>
> Just like OP, i did not have a clue that yugabyted will simply keep the T-Master higher then the RF(3), as hot standby.

Correct.

> [@Benjiro](#):
>
> This ties in to the Yugubyte Smart drivers, as they get updated with the promoted T-Masters.

The smart drivers don’t connect to yb-masters. No driver does.

> [@Benjiro](#):
>
> To be honest, a lot of information about Yugubyte, is rather confusing as its a mix of older T-Server/T-Master, and the newer yugabyted documentation.

yugabyted just starts yb-tserver/master and manages them. It’s tserver/master all the way down.

> [@Benjiro](#):
>
> Its one of those things that made me try CockroachDB first, as its installation was easier, where as Yugubyte goes down a entire path of T-Server, T-Masters

It’s true that having a single server-type is easier to manage. While having 2 layers (data & metadata) is better in efficiency in larger clusters.

> [@Benjiro](#):
>
> and LLM’s do not pick yugabyted as the first option.

I’ve found LLMs a bit unhelpful. They are also old depending when they crawled.

> [@Benjiro](#):
>
> Note: Might be interesting to show this visually in the UI… Like Active Masters 3/3, Hot Spares 5/5.

The Hot Spares aren’t part of the cluster though. They’re only known by yugabyted cli.

---

<div class="post-metadata">

**Author:** ![Benjiro](https://avatars.discourse-cdn.com/v4/letter/b/ecb155/32.png) [@Benjiro](https://forum.yugabyte.com/u/Benjiro)\
**Post date:** [March 24, 2025, 10:52am UTC](https://forum.yugabyte.com/t/what-happens-if-i-run-more-yb-master-nodes-than-the-replication-factor/4100/11 "2025-03-24T10:52:44Z")

</div>

> [@dorian\_yugabyte](#):
>
> The Hot Spares aren’t part of the cluster though. They’re only known by yugabyted cli.

But they are hot spares, what technically makes then part of a cluster universe? Do the yugabyted servers also communicate between each others, as to allow for the hot-spare activation?

> [@dorian\_yugabyte](#):
>
> The smart drivers don’t connect to yb-masters. No driver does.

You mean the layer above the T-Masters, like the YSQL and YCQL… As those are the client communication layers?

This complexity of layers explains why there are so many ports involved. _lol_

---

<div class="post-metadata">

**Author:** ![nmalladi](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.yugabyte.com/nmalladi/32/236_2.png) [@nmalladi](https://forum.yugabyte.com/u/nmalladi)\
**Post date:** [March 24, 2025, 6:40pm UTC](https://forum.yugabyte.com/t/what-happens-if-i-run-more-yb-master-nodes-than-the-replication-factor/4100/12 "2025-03-24T18:40:25Z")

</div>

@Benjiro

`But they are hot spares, what technically makes then part of a cluster universe? Do the yugabyted servers also communicate between each others, as to allow for the hot-spare activation?`

yugabyted creates shell masters on all the nodes. Shell masters are not part of the universe, and in no way interact with the cluster. Shell master gets promoted to masters or gets stepped down only when the `yugabyted configure data_placement` command is executed. yugabyted does not communicate with each other, it’s a local daemon only.

The `configure data_placement` command gets the details of `--cloud_location` and `--fault_tolerance` from all the nodes in the cluster to compute the placement location of masters, and places the yb-master process in appropriate fault domains. This allows the flexibility to users to bring the yugabyted nodes in any order and doesn’t force the user to start the nodes in appropriate fault domain, as is the case with yb-master/yb-tserver way of deployment.

Thanks for the feedback on docs. We are making yugabyted first class citizen in docs, most of the docs should be refreshed with yugabyted steps by 2025.1 release.

Thanks.  
Nikhil Chandrappa  
Lead Engineer, YugabyteDB OSS
