I wanted to add some features to my site which would require using Node.js over websockets. So my options are:

  1. Install Node on a separate VPS;
  2. Install Node on the same server where my websites are.

Let's say the main server has enough resources to handle both MySQL, Nginx & PHP (about 10 websites) and Node. At the same time, getting one more VPS isn't a problem either.

My initial concern was not being able to make Node listen on common ports like 443 (which are less likely to be firewalled on user's end), but I can make Nginx, which is already listening on that port, proxy the corresponding requests to Node, so that's not that big of an issue.

I looked through Apache and Node.js on the Same Server, Node.js apps and wordpress on the same vps, as well as this search results page, but those mostly cover the actual setups, and not the reasoning behind choosing them.

It feels like getting an additional VPS is somehow a more reliable, cleaner idea, but I might be wrong, so I'm asking for your advice on the arguments to justify getting an additional VPS.

  • 1
    This is too opinion based, imo. That said I'm a huge advocate of one role per server.. If you are using Nginx just to proxy to node it's one thing.. If you are doing more it's something else. – Tim Brigham Nov 28 '16 at 19:44
  • @TimBrigham I agree, I wanted to keep them separate myself, I just needed arguments to justify that to my clients. Let me actually edit the question to highlight that. – aexl Nov 28 '16 at 20:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.