<div>Warning: I'm mostly a programmer.</div><div><br></div>Sendmail can be configured locally on front end servers to store and forward so you can talk to a local _process_ that can forward on to a centralised mail gateway out. You don't have to make SMTP connections from your front ends and you can queue mail locally and let your MTA take care of async delivery.<div>
<br></div><div>Just a thought.<br><br><div class="gmail_quote">On 7 August 2011 20:52, Chris Parsons <span dir="ltr"><<a href="mailto:chris.p@rsons.org">chris.p@rsons.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word"><div><div class="im"><div>On 7 Aug 2011, at 18:29, steven shingler wrote:</div><br><blockquote type="cite">Thanks for that straight-up explanation, Chris. This has been a really interesting thread.</blockquote>
<div><br></div></div><div>Thanks. Also +1 to what Jolyon said: didn't see his email until after I wrote mine. He was "on point" through the whole day (I was away) and did a great job.</div><div class="im"><br>
<blockquote type="cite"><div>Seems pretty clear then, sticking your outbound email in a background job runner would sort it. Easy to miss when you're on a deadline - I'm actually really impressed you had time to do the jmeter-ing before launch! :)</div>
</blockquote><div><br></div></div><div>That was Alan our PM/tester: he can work wonders with a jmeter config!</div><div class="im"><br><blockquote type="cite">
<div>Quite a few of the posts on the thread have mentioned unicorn and nginx, here's a write-up of how we're using them, together with bluepill for monitoring and resque for background jobs: <a href="http://www.devmull.net/articles/unicorn-resque-bluepill" target="_blank">http://www.devmull.net/articles/unicorn-resque-bluepill</a> - hope that's useful, would be cool to know if others have found better configs.</div>
</blockquote><div><br></div></div>Nice. I'd love to share my chef setup at some point, pending clearance from GDS. Will possibly blog about that too in future.</div><div><br></div><font color="#888888"><div>Chris</div>
</font><div><div></div><div class="h5"><div><br></div><div><blockquote type="cite">
<div><br></div><div>Cheers,</div><div>Steven<br>
<br><br><div class="gmail_quote">On Sun, Aug 7, 2011 at 5:02 PM, Chris Parsons <span dir="ltr"><<a href="mailto:chris.p@rsons.org" target="_blank">chris.p@rsons.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">Hi Paul,<div><br><div><div>On 5 Aug 2011, at 09:33, Paul Robinson wrote:</div><br><blockquote type="cite"><div style="word-wrap:break-word"><div><div>It would be interesting to hear what caused the e-petitions site to go under. What cacheing was in use? Which tier gave in first? Was the load profile unexpected in that it was biased to some corner of the app that nobody thought people would be much interested in?</div>
</div></div></blockquote><blockquote type="cite"><div style="word-wrap:break-word"><div><br></div><div>1000/minute is less than 17 requests/second, and to my mind doesn't seem too absurd: almost 60ms per request on a single thread. A moderate server in terms of CPU with decent RAM, local MySQL instance and 4-6 Passenger threads should be able to handle that no problem at all, I think. So it would be interesting to hear which part of it failed first.</div>
</div></blockquote><div><br></div><div>Sorry for a bit of delay in responding to this thread. I'm planning to blog this soon, but here are the facts:</div><div><br></div><div>First up, the site didn't 'crash' as was reported: we had a few stuck rails processes and the load balancer is only a basic round robin, so you sometimes had to refresh a few times to get your request through. The site stayed up throughout if you were persistent.</div>
<div><br></div><div>The Rails processes got stuck waiting on SMTP connections for sending emails. As soon as the email sending load decreased, the site popped right back up. </div><div><br></div><div>The main lesson is not to trust your hosting environment's SMTP server to be responsive, and ensure that you send emails asynchronously right out of the gate rather than making the whole request dependent on it. We didn't quite get time to do this as part of main dev, but next time I'd proactively break this out of the critical path.</div>
<div><br></div><div>Re stress testing: We used JMeter to test the site load extensively, and pre-launch we were getting 50 req/second without much trouble. However, the one difference being that we were using dummy email addresses in our JMeter scripts, which the hosting environments SMTP service was discarding very quickly, and it could therefore take a much higher volume than in real life. Should've thought of that possibility, too :)</div>
<div><br></div><div>Hope that clears a few things up: happy to answer any other questions people have.</div><div><br></div><div>Thanks</div><div>Chris</div><div><br></div><div><br></div><br><blockquote type="cite">_______________________________________________<br>
Chat mailing list<br><a href="mailto:Chat@lists.lrug.org" target="_blank">Chat@lists.lrug.org</a><br><a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
</blockquote></div><font color="#888888"><br><div>
<span style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium">--<br>
Chris Parsons<br><a href="mailto:chris.p@rsons.org" target="_blank">chris.p@rsons.org</a><br><a href="http://twitter.com/chrismdp" target="_blank">http://twitter.com/chrismdp</a><br><a href="http://pa.rsons.org/" target="_blank">http://pa.rsons.org</a><br>
<br><br><br></span>
</div>
<br></font></div></div><br>_______________________________________________<br>
Chat mailing list<br>
<a href="mailto:Chat@lists.lrug.org" target="_blank">Chat@lists.lrug.org</a><br>
<a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
<br></blockquote></div><br></div>
_______________________________________________<br>Chat mailing list<br><a href="mailto:Chat@lists.lrug.org" target="_blank">Chat@lists.lrug.org</a><br><a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
</blockquote></div><br><div>
<span style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium">--<br>
Chris Parsons<br><a href="mailto:chris.p@rsons.org" target="_blank">chris.p@rsons.org</a><br><a href="http://twitter.com/chrismdp" target="_blank">http://twitter.com/chrismdp</a><br><a href="http://pa.rsons.org" target="_blank">http://pa.rsons.org</a><br>
<br><br><br></span>
</div>
<br></div></div></div><br>_______________________________________________<br>
Chat mailing list<br>
<a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>
<a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
<br></blockquote></div><br></div>