Junior,
Not exactly your question, but there are sometimes reasons to proxy your
node.js app behind another Web server (say to share a domain or subdomain
with other applications or content without using a new public port). Choose
nginx in that case if you can. There are good tutorials for setting up
node.js apps as an upstream of nginx. The evented model of nginx works
better in cases where you're using some of the things node.js (or should I
be saying io.js these days?) excels at like keeping WebSocket connections
open. You'll generally get better concurrency and memory use with nginx in
these cases. Apache's blocking and threaded model is not suitable for
things like WebSockets. I can't say I fully understand all this, but from
what I've read and experienced it is true.
Reading David Naughton's post: I recommend Passenger to folks who aren't
system admins and want to run Ruby, node.js, or wsgi applications. nginx is
very easy to install using Passenger's installer and then you can choose to
use Passenger or not. If you use Passenger and your node app is not set up
to deal with multiple instances spawning then you will run into issues, so
you'll want to set the maximum instances for your application in Passenger
config to 1.
Jason
On Thu, Dec 11, 2014 at 12:03 PM, Junior Tidal <[log in to unmask]>
wrote:
> Hi all,
>
> I'd like to experiment with node.js on our production server to create a
> small calendar app.
>
> I was wondering if it's better to run node.js on the same server with
> Apache, or to set it up a separate cloud instance?
>
> I'm not sure if one is better than the other.
>
> Best,
>
> Junior Tidal
> Assistant Professor
> Web Services and Multimedia Librarian
> New York City College of Technology, CUNY
> 300 Jay Street, Rm A434
> Brooklyn, NY 11201
> 718.260.5481
>
> http://library.citytech.cuny.edu
>
|