<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Matt, you got me thinking this morning that I *just* read an article about this very topic and it was driving me nuts that I couldn't find it. It was a link posted by @ioerror on twitter and I finally found it!<div><br></div><div><a href="http://www.imperialviolet.org/2010/06/25/overclocking-ssl.html">http://www.imperialviolet.org/2010/06/25/overclocking-ssl.html</a></div><div><br></div><div>Thanks!</div><div>-Tom</div><div><br></div><div><br><div><div>On Nov 4, 2010, at 10:49 AM, Matthew Nuzum wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="gmail_quote">On Thu, Nov 4, 2010 at 10:17 AM, Matthew Steven <span dir="ltr"><<a href="mailto:matthew@geniusweb.com">matthew@geniusweb.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 11/04/2010 09:35 AM, Matthew Nuzum wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
What kinds of latency do you think is realistic from a good server doing SSL? Maybe 350ms is the norm?<br>
<br>
</blockquote></div>
Benching a simple dynamically generated XML feed on one of my sites over SSL on a live server, I'm getting the following using a brief benchmark of 'ab -n 100 -c 5'<br>
<br>
Time per request: 170.048 [ms] (mean)<br>
Time per request: 34.010 [ms] (mean, across all concurrent requests)<br>
<br>
There's no caching or anything involved, other than opcode. It's a pretty new and ballsy machine though, so it may not be a fair comparison from that aspect.<br>
<br></blockquote><div><br></div><div>OK, very interesting observation. I decided to do the test from localhost and it cut the latency big time.</div><div><br></div><div><div>Time per request: 98.595 [ms] (mean)</div>
<div>Time per request: 98.595 [ms] (mean, across all concurrent requests)</div></div><div>(keep in mind that the file is <?php echo "hello world"; ?> on a server with zero load)</div><div><br></div><div>
This appears to be a function of network latency so there may not be a solution. :-/ I'm guessing that the SSL handshake requires a couple extra round trips.</div><div><br></div><div>Non-ssl is still much faster at:</div>
<div><div>Time per request: 0.354 [ms] (mean)</div><div>Time per request: 0.354 [ms] (mean, across all concurrent requests)</div></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I was surprised to find that using nginx for all the static content made a huge difference in the memory footprint overall, since this way one can reduce the number of apache threads a great deal and use apache only for serving php.<br>
<br>
Look at it this way: why would you want a fully loaded down apache thread with its big php modules and a dozen other things you may or may not be using serving up an image, when you can have a microscopic nginx service serving it with very little resource usage. In any given page these days, 80% of the requests are going to be for external resources like images and text anyhow.<br>
<br>
Oh, and you'll want to have munin or some other decent monitor installed to actually be able to tell if what you're doing helps or harms once it is out there.</blockquote></div><br clear="all">My intention was to offload most of the static content to s3 / cloudfront and use my server for hosting dynamic content. S3 is so darn cheap and then I get the benefit of extra http pipelines.<div>
<br></div><div>In your experience, does using Ngninx on mostly dynamic sites provide any benefit? I've noticed the memory footprint is quite low compared to Apache but I've got very very limited experience using it for dynamic content.<br>
<div><br>-- <br>Matthew Nuzum<br>newz2000 on freenode, skype, linkedin, <a href="http://identi.ca/" target="_blank">identi.ca</a> and twitter<br><br>"An investment in knowledge pays the best interest." -Benjamin Franklin <br>
<br>
</div></div>
_______________________________________________<br>Cialug mailing list<br><a href="mailto:Cialug@cialug.org">Cialug@cialug.org</a><br>http://cialug.org/mailman/listinfo/cialug<br></blockquote></div><br></div></body></html>