small fixups to the advanced sections
remove useless separators
add small section about getting help and smart questions
move advanced to collapsible section
update README
fluff up the features, referencing the new image
By default, the "chan" pm2 process (the main web serving component of jschan backend) will be "clustered". In nodejs this means that you can have multiple processes e.g. sharing the same port, whereby the "master" will accept connections and pass the handlers over to each process in a round-robin fashion. The pm2 master process handles all this and allows for nice things like zero downtime reloads. The downside is that there is a slight overhead associated with having that single thread accept connections and delegate them to each worker. Instead, you can run each chan process on a sequential port, starting from the port in configs/secrets.js. Then you can configure multiple ip:ports in nginx to connect to each nodejs process independently. Note: pm2 reload will no longer give zero downtime restarts this way.
By default, the "chan" pm2 process (the main web serving component of jschan backend) will be "clustered". In nodejs this means that you can have multiple processes e.g. sharing the same port, whereby the "master" will accept connections and pass the handlers over to each process in a round-robin fashion. The pm2 master process handles all this and allows for nice things like zero downtime reloads. The downside is that there is a slight overhead associated with having that single thread accept connections and delegate them to each worker. Instead, you can run each chan process on a sequential port, starting from the port in configs/secrets.js. Then you can configure multiple ip:ports in nginx to connect to each nodejs process independently.
**Note: pm2 reload will no longer give zero downtime restarts this way.**
1. Change the `exec_mode` in ecosystem.config.js and some code in server.js for listening to the ports:
@ -215,7 +220,7 @@ upstream chan {
You will need to match the number of servers to however many chan processes you are running, which by default is (number of cpu threads/2)