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

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)?

Hi @Manish

How are you deploying? Using yugabyted?

Hi @dorian_yugabyte Deploying manually as mentioned here: Manual deployment of YugabyteDB clusters | YugabyteDB Docs

I am trying to setup deployment automation via chef cookbooks.

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 for now if you want to replicate.

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.

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

Read YB-Master service | YugabyteDB Docs for more info.

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.