Question - using DS with PM2
Are there any issues running a deepstream nodejs server or client with the PM2 library (pm2.keymetrics.io)?
They seem complementary, but (without looking at the source) maybe there are low-level gotchas with how deepstream c libs handle things.
We use pm2 quite often to run deepstream, and have not run into any issues as of yet! PM2 can run pure binaries too so is not confined to the nodeJS space.
We will be looking to provide our own daemon in the near future,, allowing multiple deepstreams to be run on the same machine to easily scale vertically and deal automatically with log rotation and such ( will be focused mainly on linux servers at first ).
Generally, we recommend using the compiled executable. This is perfectly possible with pm2 as well which is just as good handling non-node processes. The command to start a deepstream process with a name of ds-dev and a specific config file would be e.g.
pm2 start --name ds-dev deepstream -- start -c ~/config-dev.yml
You can find more detailed examples here
http://stackoverflow.com/questions/39662059/multiple-instances-of-deepstream-io-server-inside-one-node
Thanks a lot! That's all clear, and very helpful. I don't expect to have many parallelism use-cases, certainly not on AWS, but I'm just trying to figure out possible architecture strategies and tech stack.