malayter at gmail.com
Thu May 19 17:24:12 MSD 2011
On Fri, May 6, 2011 at 6:01 AM, Jonathan Leibiusky <ionathan at gmail.com> wrote:
> I am trying to virtualize nginx in my own private cloud. Is there any
> special consideration regard configuration that I have to consider?
> Anyone did something similar? Regard throughput, anyone with some
> numbers to share?
We run nginx on single-core VMs both internally and in our hosted
environment. Performance is excellent. WE allocate just 1-2 GB RAM per
vm. The stack is:
nginx 0.7.67->Ubuntu 10.04.2->Vmware ESX 4.1->Dell 2950III (Xeon 5300 series).
I recall seeing >8000 requests/sec using apache bench for a static
file 50K. And something like 5000 requests/sec for the same file
served through nginx being proxy_passed to an IIS backend (without
nginx proxy_cache). This is on a local LAN.
In our production internet-facing environment, which uses only
proxy_pass and proxy_cache in front of a Tomcat cluster, we routinely
see peaks 1000+ requests/sec through any single nginx VM. About 70% of
these requests are for static files that are usually hits in
proxy_cache, the rest are dynamic pages from the Tomcat servers. In
short, it just works. The only nginx tuning we really had to do was
adjusting proxy_buffers upwards, adding more workers, and setting more
connections per worker. We use 10 worker processes per core to get
around the lack of AIO on Linux.
As with all performance numbers, YMMV. There are*no* magic solutions,
and no substitutes for doing your own load testing on your own code
and hardware. We spent about 6 man-weeks building our load tests with
NeoLoad, and now we can re-run whenever we have a new code release or
are testing different infrastructure pieces.
More information about the nginx