Print

Print


Junior, sincerely hope that helped. Seems like you made a good choice.

Jason, thanks for the tip: I did not expect Passenger to ship with an nginx
compiler/installer. (Just starting to experiment myself!) Useful not only
for people who aren't system admins, but for those who don't have root on
the target machine, like me. For a (node|io).js reverse proxy, I would
prefer nginx over Apache, for some of the reasons you listed. However, by
default nginx requires read/write access to directories typically
accessible only to root, even just to start and stop the server. Changing
that default, as well as other common modifications, requires you to
compile nginx yourself. But without root, custom compilations can be
painful, too. The Passenger installer eases the pain, because it compiles
nginx for you so that you can control it without root privileges, and will
alert you to any missing compilation dependencies on your system, giving
you the exact package names. Passenger's mod_passenger installer does the
same thing. More details in these Passenger docs on nginx:

https://www.phusionpassenger.com/documentation/Users%20guide%20Nginx.html
https://github.com/phusion/passenger/wiki/Why-can't-Phusion-Passenger-extend-my-existing-Nginx%3F

David

On Thu, Dec 11, 2014 at 2:39 PM, Junior Tidal <[log in to unmask]>
wrote:
>
> Thanks Jason and David for you input.
>
> Yes, to clarify I've worked on some node apps on a workstation then push
> them onto a production server to see how it works with other things on that
> server.
>
> However, it seems like the better route is to start up a instance
> dedicated just for node apps. I'll try out nginx and Passenger to see if it
> meets our needs.
>
> Best,
> Junior
>
> 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
>
>
> >>> Jason Ronallo <[log in to unmask]> 12/11/2014 1:22 PM >>>
> 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
> >
>