<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Paul,<div><br><div><div>On 5 Aug 2011, at 09:33, Paul Robinson wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><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; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><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">Chat@lists.lrug.org</a><br>http://lists.lrug.org/listinfo.cgi/chat-lrug.org<br></blockquote></div><br><div>
<span class="Apple-style-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; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">--<br>Chris Parsons<br><a href="mailto:chris.p@rsons.org">chris.p@rsons.org</a><br>http://twitter.com/chrismdp<br>http://pa.rsons.org<br><br><br><br></span>
</div>
<br></div></body></html>