Running multiple instances of Parse Server on the same machine

When migrating from Parse.com to Parse Server, I learned the hard way that NodeJS is not multi-threaded.

ParseServer is made in JavaScript with NodeJS and unfortunately, this technology doesn’t take advantage of the multiple cores your server can have.

This lead to a waste of resources: imagine that a running instance of your server is only using 25/30% CPU before latency goes up. At that point, you have to deploy a new instance of the same server to maintain a low latency. Why? Because of the use of a single thread, incoming requests are quickly queued, especially if one the request takes time to build the response.

To take advantage of the multiples cores you may have on your server, you can use a worker manager such as Throng to manage multiple instances of your Parse Server on the same machine:

Don’t ask for too many workers. The appropriate number of workers depends of the number of cores your machine has and is usually a number between 1 and (2 x NUMBER_OF_CORES) + 1.

Writing self-documenting code

Great article giving tips on how to write self-documenting good (aka good code), even though this is written for JavaScript, most of the tips can directly be applied to any languages.

15 Ways to Write Self-documenting JavaScript by Jani Hartikainen: https://www.sitepoint.com/self-documenting-javascript/

Note: this definitely has to be ported to Swift, any volunteer?