6 messages in ru.sysoev.nginxRe: nginx vs apache as a reverse proxy
FromSent OnAttachments
Linden VarleyMar 1, 2009 10:43 pm 
Chang SongMar 2, 2009 2:19 am 
Cliff WellsMar 2, 2009 3:07 pm 
Linden VarleyMar 2, 2009 7:16 pm 
Cliff WellsMar 2, 2009 8:11 pm 
Linden VarleyMar 3, 2009 5:00 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: nginx vs apache as a reverse proxyActions...
From:Chang Song (Chan@me.com)
Date:Mar 2, 2009 2:19:44 am
List:ru.sysoev.nginx

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_tw_recycle=1 tcp_tw_resue=1 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