I am working on a service (written in Go), which is expected to receive a huge number of requests. As per the architecture, each pod of the service is supposed to serve specific clients. Lets say, if there are 3 pods of this service, the split will be like -> A-H
, I-P
, Q-Z
, where each letter is client's name's first letter.
But if there are 4 pods of this service, then split can be -> A-F
, G-N
, O-U
, V-Z
.
Is there a way I can know in Go code how many other replicas are there?
PS: AFAIK, one possibility is to have an environment variable
in deployment.yaml
. But there are ways where scaling can be done without changing the yaml
.