node.js - Is it possible to run sails.js on a node cluster? -


I am currently running an Express Server using the node JS Vanilla Cluster Setup as shown here: / p>

I want to transfer the server to sails.js and I am thinking that any node cluster (no proxy, just simple cluster) is configured to support sail How to know TX,

Sean.

First of all - if you want to use session, you need to use session store . Otherwise the session will not be shared between your app's examples.

Again, the easiest way to use something like PM2, which can be found here:

You do not have to make changes in your app.js files - it Standard non-clustered sails should be written as an app PM2 will do the job.

Just start with the app pm2 start app.js -ix where x is the number of instances or use Pm2 start app.js -i max which will start the number of processors, or instances of the processor thread.

PM2 is great and very stable, it has many features to run easily, in production, though there are some flaws in its development. If you were using an app that was using it, there is a problem with "already used port" - you have to use pm2 kill which will kill all your apps . In addition - with some extra monitoring equipment - it's just great.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -