I'm curious how many people here choose Nginx over Apache. If I have a choice in my stack, I will always choose Nginx but all too often if I'm doing work for someone else, they always demand Apache. I think it's because it's the "defacto standard" and tends to be well known among less technical people. I'm sure the same situation goes for people who prefer PostgreSQL over MySQL.
I guess my question being, how would you convince people to use your favorite stack, and sometimes the best service for the job, such as Nginx/PostgreSQL, when all they know is the most popular services. Sometimes, just convincing them it's the best for the job is not enough.
The choice of nginx vs Apache over MySQL vs PostgreSQL is not an equal comparison at all. Until the application hits very high hit rates, the web server choice is mostly inconsequential. RDBMS choice will have real impact on the developers from the outset.
Depends. At the very low end of hardware, it makes a big difference too. My VPS originally had 360mb RAM and Apache would fall over during traffic spikes. I switched to nginx and the problems went away.
That said, someone who knows more about configuring Apache for performance likely would not have this problem. I'm just a developer throwing up a blog, however, and switching to nginx was quicker than figuring out how to make Apache work better.
That's fair. I was merely looking for another comparison and the MySQL/PostgreSQL debate came to mind. I can't really think of anything that similarly compares to Apache/nginx.
I agree, that's one of the reason why I choose it. I love the config file structure, and feel it's actually much quicker to get a new host up and running on nginx over Apache.
It's not the same - you have to compile Nginx with mod_wsgi support. It's not as simple as doing an "apt-get install nginx" and it may compile with your version, or it may not compile.
mod_wsgi is an interesting example. Surely it has the wrong architecture for Nginx and something better could surely be written. But mod_wsgi for Apache simply kicks ass, being a server that manages everything for you with low overhead and good performance caracteristics. No need for supervisord or any of that crap.
Some people go as far as recommending running Nginx in front of Apache, with all the overhead that brings, just for mod_wsgi (although the same could be said about mod_php).
That's the thing about Apache - it's so mature and has so much traction that you can find quality plugins for anything and everything, being an all you can eat buffet.
But then if you're going to put Nginx in front of Apache, why go with Nginx instead of Varnish: http://www.varnish-cache.org/ -- which is designed from the ground-up to function as a high-performance proxy cache (the Nginx plugin for proxy caching sucks donkey balls IMHO)
What I'm trying to say here is that Nginx is very far from a one-size-fits-all. It's awesome for at least one website I've got written in Ruby on Rails and I'm using it in combination with Passenger (Ruby's mod_wsgi).
But for all my other use-cases, I'm starting with Apache first, then reconsider the move to Nginx or not.
I guess my question being, how would you convince people to use your favorite stack, and sometimes the best service for the job, such as Nginx/PostgreSQL, when all they know is the most popular services. Sometimes, just convincing them it's the best for the job is not enough.