When do you know when to scale up replicas?
I have four containers that regularly go past 100% CPU usage, but they still work because Docker Swarm just gives the containers more resources.
Is there a general rule that everyone else follows?
I’m not sure what you mean. How does Swarm gives more resources to a container? How do you see that it is on 100%?
I don’t think there is a general rule. You need to know the application that you are running. You need to know its resource requirements and how it will be used. How many requests it has to handle and scale if you se it uses too much. If you have a monitoing system, you can be notified. In Kubernetes, there is an autoscaler feature as well, but I guess it is not available in Swarm.