nginx vs apache as a reverse proxy

Chang Song Chang.Song at
Mon Mar 2 13:20:07 MSK 2009

I have found similar issue before.
Usually it is the number of sockets in TIME_WAIT (due to non keepalive).

Do you have KeepAlive in the backend Apache server?
Try to widen local_port_range and number of sockets in TIME_WAIT.

tcp_max_tw_buckets=800000 (YMMV)
tcp_timestamps=1     (usually performance hit, but in this situation,  
it will help)

On Mar 2, 2009, at 3:43 PM, Linden Varley wrote:

> I’m doing some simple testing on a FreeBSD 7.0 server comparing  
> Apache2 vs Nginx as a reverse proxy to an Apache backend server. The  
> backend serves mainly static images using mod_python.
> I have yet to do thorough testing but it seems as though Apache2 has  
> slightly higher throughput (KB/s measured using Jmeter) when  
> compared to Nginx under moderate load.
> Has anyone else found Apache to have a higher throughput as a  
> reverse proxy? Can I assume it’s because Nginx doesn’t use http keep- 
> alives to backend servers and thus creates a new connection upon  
> each request?
> Cheers
> -          Linden
> The contents of this email are confidential and may be subject to  
> legal or professional privilege and copyright. No representation is  
> made that this email is free of viruses or other defects. If you  
> have received this communication in error, you may not copy or  
> distribute any part of it or otherwise disclose its contents to  
> anyone. Please advise the sender of your incorrect receipt of this  
> correspondence.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list