

How to handle 1000's of concurrent users on a 360MB VPS - mmaunder
http://markmaunder.com/2009/how-to-handle-1000s-of-concurrent-users-on-a-360mb-vps/

======
evgen
Use nginx? That is the sum total of your advice? What a complete waste of
time.

~~~
joshu
It's simple but non-obvious advice. He also explains the reasoning why.

I had to do the same thing for Delicious, back in the day (except I used
Pound[1], nginx was much less mature then, if it existed at all.)

[1] <http://www.apsis.ch/pound/>

~~~
evgen
I guess if you have no experience running a large site it might seem non-
obvious, but this is not exactly rocket science. Every c10k article will talk
about using a reverse proxy and why nginx is the best choice out there right
now (varnish can sometimes deliver better throughput but it is finicky and for
some reason certain configs will just cause it to explode, it also does not
support some compression schemes that you might want to use.) Five years ago a
scheme like this would have seemed obscure and a cool discovery, now it is
just how things are done.

I am not sure when you last got your hands dirty at the pointy-end of the
operations stick, but this is up there with tuning tcp buffers and keeping
static content on another server in terms of being par for the course.

A more interesting explanation would have described some of the other options
available and how and why you might choose one over the other, or maybe a
useful trick or two: for example, if you need to track sessions by IP address
using this basic setup you will need to drop the originating ip address into
the header as it passes through nginx and then use mod_rpaf on the back-end
apache server to reinject it so that your apache code does not even know that
a reverse proxy is fronting its requests. I guess something a bit beyond "I
used nginx to do what everyone claims it is good for and damn if it didn't
work as advertised" would have been nice.

~~~
mmaunder
Use proxy_set_header? That's your more-interesting-explanation? You probably
don't want to go "tracking sessions by IP address" or you might just think
half of AOL is one session.

~~~
evgen
No, it is not really a more interesting explanation; I really only use it to
serve as an additional flag to signal possible voting rings and sock-puppet
activity -- either way sometimes the back-end servers really need or want to
know the ip address of the original source.

It was mostly random tossed off example of something that might have been
mentioned by you in addition to just saying "use nginx as a reverse-proxy."
There is nothing wrong with stating this, but I can't see why you think this
is something that is not a part of the general knowledge-base of this
community. I realize that you want to pimp your blog, but you could have
probably chosen something more useful or interesting to the community. At the
very least you could have added more content so that the 99% of the community
that already knew this would have been able to get something out of this or at
least not felt like their time was wasted. At the very least you could have
tightened up the headline slightly so that the fact that nginx was the
solution to the problem posed was stated in the headline itself.

