<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>I have found similar issue before.</div><div>Usually it is the number of sockets in TIME_WAIT (due to non keepalive).</div><div><br></div><div>Do you have KeepAlive in the backend Apache server?</div><div>Try to widen local_port_range and number of sockets in TIME_WAIT.</div><div><br></div><div>tcp_max_tw_buckets=800000 (YMMV)</div><div>tcp_tw_recycle=1</div><div>tcp_tw_resue=1</div><div>tcp_timestamps=1 &nbsp; &nbsp; (usually performance hit, but in this situation, it will help)</div><div><br></div><div><br></div><div><br></div><br><div><div>On Mar 2, 2009, at 3:43 PM, Linden Varley wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="color: rgb(0, 0, 0); "><div lang="EN-AU" link="blue" vlink="purple"><div class="Section1"><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; ">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.<o:p></o:p></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; ">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.<o:p></o:p></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; ">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?<o:p></o:p></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; ">Cheers<o:p></o:p></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 36pt; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: -18pt; "><span>-<span style="font: normal normal normal 7pt/normal 'Times New Roman'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span></span></span>Linden<o:p></o:p></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div></div><br><hr><font face="Arial" color="Gray" size="1">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.<br></font></div></span></blockquote></div><br></body></html>