There is a multicore server, you need to use all of its kernels, the application works like a Docker container, deployed via wercker . Using node.js cluster module does not make sense because the container uses 1 core ( is this correct? ). I do not use docker-compose . Thoght about:
- Still, use node cluster to create several application instances, and when starting the container, specify the
cpus=CORES_QUANTITY. Ie: if I create 10 instances in a container and specifycpus=10, then one container with 10 workers should be launched, which will use 10 cores. But is it? - Run it as Docker Swarm on a single server. Then you need to create a service, and linking, as when creating a container, the service is impossible. And you need to bind some more services (DB, for example). If I create one
networkfor them, then the containers will not need to link? In this manner:
docker service create --network primary --replicas 10 MyApp
docker service create --network primary --replicas 2 MyDB
Is it possible? And how will they balance each other, communicate?
Or maybe there are more options?