Can I start multiple service instances on a single host?

Say I have a node.js or other single-process app that doesn’t support multiple threads, but could benefit from spinning up multiple stateless instances. Does Rancher with Cattle allow this?

Whenever I try scaling up a service, it stays degraded and I get errors about constraints not being met. I guess it’s trying to spin the instance up on multiple hosts, but in this case I only have one and am using Rancher mainly for the tooling and easier administration. Is there no way to, say, spin up multiple instances of the app on the same multi-core server?

A host port can only be used by one container at a time. So if you want more than one on the same host, or more generally a service’s scale > num_hosts, you need to not publish any host ports for the service. Then you can run as many as you want on each host.

You’ll still want to be able get to them probably, so then you create a load balancer that listens on a public host port and then directs traffic to the service containers.