Does Meteor make better use of a multi-core server by using the fibers library than a traditional nodejs application?
It depends purely on what problem you are trying to address.
A common reason why people would consider running multiple instances of Meteor is if their Meteor webapp is saturating the Node.js event loop.
This is better handled by either of the following:
- Finding the cause of the high CPU usage and seeing if their algorithms or design can be reengineered to make it more efficient.
- Modifying the webapp so that the CPU intensive code runs asynchronously in the Node.js threadpool
- Using the Node.js cluster module to spawn additional worker processes which can then communicate with each other and/or the main parent process.
To me it makes sense when one server is sufficient and you have a load balancer in front. Then you can update the instances one after another without downtime.
Erm, you can do that without any downtime even with a single instance of Meteor running.
For example, I’m unpacking the build folder into a folder named with a timestamp, simply update a symlink and then a simple pm2 restart app_name
will do the trick.