# The meaning of 'replicas' in the Helm configureation's values.yaml file

**URL:** <https://forum.weaviate.io/t/the-meaning-of-replicas-in-the-helm-configureations-values-yaml-file/1944>\
**Category:** Support\
**Created:** [April 8, 2024, 7:25am UTC](https://forum.weaviate.io/t/the-meaning-of-replicas-in-the-helm-configureations-values-yaml-file/1944 "2024-04-08T07:25:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rio](https://avatars.discourse-cdn.com/v4/letter/r/ea666f/32.png) [@Rio](https://forum.weaviate.io/u/Rio)\
**Post date:** [April 8, 2024, 7:25am UTC](https://forum.weaviate.io/t/the-meaning-of-replicas-in-the-helm-configureations-values-yaml-file/1944/1 "2024-04-08T07:25:35Z")

</div>

Hello.  
I have a question.

I configured the k8s cluster by setting the values.yaml file of Helm as follows.

* * *

## replicas: 3 updateStrategy: type: RollingUpdate resources: {}

I’ve checked that when configured this way, 3 pods and 3 Persistent Volumes(PVs) are created.  
I would like to know whether the numbner specified in the replicas setting is for shards or replicas?  
If I import data with this configuration, is it sharded into three or replicated into three?

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [April 8, 2024, 7:45pm UTC](https://forum.weaviate.io/t/the-meaning-of-replicas-in-the-helm-configureations-values-yaml-file/1944/2 "2024-04-08T19:45:54Z")

</div>

hi @Rio! Welcome to our community 🤗

in our Helm, whatever number you specify as `replicas`, are the number of nodes that k8s will spin up for your cluster.

This will, in fact, activate all the replication architecture, as described here:

> **[Replication Architecture | Weaviate - Vector Database](https://weaviate.io/developers/weaviate/concepts/replication-architecture)**
>
> Weaviate can automatically replicate data across nodes in the background in a cluster with multiple server nodes. This enables a variety of use cases. For example, if a node goes down, another node can shoulder the load without loss of availability...

Let me know if this helps 🙂

Thanks!

---

<div class="post-metadata">

**Author:** ![Rio](https://avatars.discourse-cdn.com/v4/letter/r/ea666f/32.png) [@Rio](https://forum.weaviate.io/u/Rio)\
**Post date:** [April 9, 2024, 4:32am UTC](https://forum.weaviate.io/t/the-meaning-of-replicas-in-the-helm-configureations-values-yaml-file/1944/3 "2024-04-09T04:32:41Z")

</div>

Thank you for your response.  
I understand that the replicas setting in the helm values file is not directly related to the number of replicas.  
The number of replicas is set through ‘replication\_config’ when creating a collection. ([Replication | Weaviate - Vector Database](https://weaviate.io/developers/weaviate/configuration/replication))  
If so, with the number of replicas in the helm values file set to 3, and if I create a collection without specifying a separate ‘replication\_config’ and import data, will it be distributed and stored in three nodes? Can this be called sharding?

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [April 15, 2024, 11:16am UTC](https://forum.weaviate.io/t/the-meaning-of-replicas-in-the-helm-configureations-values-yaml-file/1944/4 "2024-04-15T11:16:42Z")

</div>

Hi!

When you set replicas to 3 in your helm chart, Kubernetes will spin 3 Weaviate servers, and make them a cluster with 3 nodes.

Now, you can have a collection with replication factor as one, this means, it will only have all objects in one of your nodes:

> **[Replication | Weaviate - Vector Database](https://weaviate.io/developers/weaviate/configuration/replication)**
>
> Weaviate instances can be replicated to increase availability and read throughput, and to enable zero-downtime upgrades. On this page, you will learn how to set replication for your Weaviate instance.

If you create a collection on a cluster that has 3 nodes, and specify the replication factor to 3, they will have 3 copies of all data on those 3 nodes.

By default, the replication factor is one. So if you want your collection with a different replication factor, you need to explicitly define that.

This is not sharding. Check here for the difference:

> **[Replication Architecture | Weaviate - Vector Database](https://weaviate.io/developers/weaviate/concepts/replication-architecture#replication-vs-sharding)**
>
> Weaviate can automatically replicate data across nodes in the background in a cluster with multiple server nodes. This enables a variety of use cases. For example, if a node goes down, another node can shoulder the load without loss of availability...

Let me know if this is clear!

Thanks!

---

<div class="post-metadata">

**Author:** ![Rio](https://avatars.discourse-cdn.com/v4/letter/r/ea666f/32.png) [@Rio](https://forum.weaviate.io/u/Rio)\
**Post date:** [April 16, 2024, 2:26am UTC](https://forum.weaviate.io/t/the-meaning-of-replicas-in-the-helm-configureations-values-yaml-file/1944/6 "2024-04-16T02:26:00Z")

</div>

Hi. Dear @DudaNogueira

Thank you very much for your response.  
Before asking the above question  
I’ve created a 3-node cluster and set the number of replicas to 3  
Then I imported data into the cluster with the default option.  
I have checked that the storage of all 3 nodes is increasing.  
So, I wondered if it was sharding.  
Now In your reply, I know that this is not a shading.

I also understand how to use the replication feature.  
However, I am not sure exactly how to use sharding.

I found a way to use shading in the document below.

> **[Collection schema | Weaviate - Vector Database](https://weaviate.io/developers/weaviate/config-refs/schema#shardingconfig)**
>
> Introduction

It’s described as follows.  
“desiredCount” : defaults to the number of nodes in the cluster.

If so, is it automatically sharded by the number of nodes in the cluster when I do not explicitly specify shardingConfig?

Could you please explain it to me?

Thank you again for your help!

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [April 17, 2024, 6:37pm UTC](https://forum.weaviate.io/t/the-meaning-of-replicas-in-the-helm-configureations-values-yaml-file/1944/7 "2024-04-17T18:37:04Z")

</div>

Hi! That is right.

By default, Weaviate will set the number of shards as the number of nodes in your cluster. If you want more shards, you can set the desiredCount to a higher number.

---

<div class="post-metadata">

**Author:** ![Rio](https://avatars.discourse-cdn.com/v4/letter/r/ea666f/32.png) [@Rio](https://forum.weaviate.io/u/Rio)\
**Post date:** [April 18, 2024, 1:19am UTC](https://forum.weaviate.io/t/the-meaning-of-replicas-in-the-helm-configureations-values-yaml-file/1944/8 "2024-04-18T01:19:48Z")

</div>

Thank you again and Have a wonderful day!
