From what I understand, Docker containers use multiple threads, and Node.js applications use only a single thread. By running something like pm2, which handles Node.js clustering, I could utilize all cores available to the Docker container.
Would this mean I could have greater utilization of each Docker instance by clustering Node.js processes? If so, wouldn't this be preferred to simply running a single threaded Node.js instance per container?
A concern would be if this has side-effects caused by the possibility of a Docker container scaling up or down the number of CPUs it's running.