[Question posted by a user on YugabyteDB Community Slack]
I have one question regarding the number of tablets for a table. I am using YSQL API, my cluster is having 3 nodes with an RF of 3 and each node has 16 cores.
I haven't specified the number of shards per table using SPLIT INTO N TABLETS syntax so I guess the number of tablets will be decided by the cores a node has, based on documentation it will be 8 shards per table per node.
In this case, the total shards for a table should be 24(8 x 3)
We have RF=3 as well, so will that mean the total shards after replication will be 72? (24 x 3)
I am confused here, as I have seen only 24 shards in the tserver tablets UI where it's mentioned that 8 shards are the leaders out of 24. Seeing this it seems the 24 shards contain the replicated ones as well.
Please correct my understanding here.
I am using 2.12, latest stable.
More questions related to the same topic, if ysql_num_shards_per_tserver=8, then:
If we create a cluster with 4 nodes with RF 3 , then the total tablets/shards will be 8 x 4 = 32 (without peers)? and 32 x 3 = 96 (including peers) ? Also, suppose if we add one more node in an existing cluster with 3 nodes, then after node addition, a new 8 tablets/shards will be created for the new node? and then tablets/shards will be rebalanced ? or new tablets/shards are not created and just the rebalancing of existing ones will happen?
num_shards_per_tserver is 8
This is for one table, at the left it shows 24 shards, 8 are leaders and rest are followers

