Preliminary remark: The word replica means repetition or copy for me, but:
When someone speaks of "one replica", does that mean one instance or two instances in total? Interestingly, I have come across the use of the former case and this makes me a little insecure. Based on the second case, would one speak of "zero replicas" if there is only one app or instance in total?
Sorry if that question seems a bit vague. Example time. My app or instance has 8 different containers in 8 different pods.
+------------+--------------+--------------+
| #container | case 1 | case 2 |
+------------+--------------+--------------+
| 8 x 1 | "1 replica" | "0 replicas" |
| 8 x 2 | "2 replicas" | "1 replica" |
| 8 x 3 | "3 replicas" | "2 replicas" |
| ... | ... | ... |
+------------+--------------+--------------+
The question whether the word replica refers to a single container/pod or to the whole app is not important here (it is equivalent), because I will replicate each different container/pod of the 8 containers/pods with the same number. I would like to know if you would rather use case 1 or case 2 (in discussions among colleagues), or if the numbering is one-based or zero-based. Please mark the question as opinion-based, if necessary.
Your question depends on many scenario factors. It's hard to say as you did not provide whole scenario. However you put
Kubernetes
tag so I can answer regardingKubernetes
.If you are referring to
Replica
inKubernetes
it means how many pods of the same application should run in cluster.It's described in Kubernetes docs that, when you create
Deployment
, it createsReplicaSet
which is responsible for number of existing pods (number of replicas).If you will deploy and scale replicas value in
Deployment
it will automatically apply changes to ReplicaSet.In
Kubernetes
, if you will set replica value to 0, you will not have any running pod in this specificDeployment
.So if you are asking about meaning of
Replica
regardingKubernetes concept
, proper is case 1.