Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Nice article, although I would like to point 2 things:

1) The line for creating virtualenv is really missing. Also, you would probably like to point out that it should be create with "--no-site-packages" (at least that's the way I prefer to do it).

2) Why there is Varnish in front of nginx? I see this mistake repeated again and again...



1) pip creates the virtualenv if it doesn't exist, and uses --no-site-packages by default (as far as I know, anyway).

2) Why not? Varnish is awesome. Is nginx as flexible as Varnish when it comes to caching?


1) Sorry, my bad... Usually I've got only setuptools and virtualenv globally installed, so pip is not available outside of virtualenv.

2) I know that Varnish is awesome, don't get me wrong. But for the most use cases putting Varnish in front of nginx doesn't add any benefits... nginx on its own can handle pretty much all standard caching use cases, so Varnish is adding only a little of per-request overhead. Of course YMMV ;)


I agree, varnish in front of nginx might be a bit overkill. We use varnish because we run apache, and I'm so infatuated with it that I recommend it to everyone. I've seen it pull off thousands of requests a second without breaking a sweat, then again nginx is no sloth either.

We are considering switching from apache, but the current setup works so well that we don't want to mess with it :)


Well, if your setup (Varnish+Apache) works for you then there is no need to change it (unless you really need to).

However, recommending this (Varnish+nginx) just leads to more people repeating the same mistake.


Varnish can also act as a (pretty good) load-balancer for your HTTP servers.


So can nginx... And it's probably a lot better at it because of number of 3rd-party load balancers and supported backend protocols (HTTP, FastCGI, SCGI, uwsgi, AJP, PostgreSQL, Drizzle, MySQL, memcached, redis and then some more... ;)).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: