HabitRPG/habitrpg — pull request #2447 by colegleason (2014-01-17 08:03:06+00:00)
Title: perf(cluster): user NodeJS cluster module to use all CPU cores

This makes the server.js file fork workers for the number of CPUs on the
system. Each worker will then bind to the MongoDB and Express
ports. They are really all using the same connection through the master
process, but this lets the logic happen in seperate threads. I do worry
that we may see more VersionErrors if one user makes more concurrent
API requests. That really isn't the fault of cluster though, as that
issue still would have been present in the previous single-core version.

You may want to add `?w=1` to the end of the file comparison URL on Github when viewing this PR :smile: