How does controller sharding work?
AdvancedConceptRepo Structure, Flux, Scaling & DR
Answer
Scale the argocd-application-controller StatefulSet to N and set ARGOCD_CONTROLLER_REPLICAS=N. Each replica handles the clusters mapped to its shard. Algorithms (controller.sharding.algorithm): legacy (hash of the cluster Secret UID, can be uneven), round-robin (even distribution by ordering), consistent-hashing (even and stable as shards change). You can pin a cluster with shard: "1" in its Secret. Sharding is by cluster, so one giant cluster with thousands of apps does not benefit; then you scale processors, or split clusters across Argo CD instances.
More on Repo Structure, Flux, Scaling & DR
Why separate the application source repo from the config (GitOps) repo?BeginnerFolders per environment or branches per environment?IntermediateHow do you promote a release from staging to production in GitOps?IntermediateWhat does a typical multi-team config repo layout look like?IntermediateHow does Flux differ from Argo CD architecturally?IntermediateWhen would you pick Flux over Argo CD, and vice versa?Intermediate