<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments for stephenwoods.net</title>
	<atom:link href="http://stephenwoods.net/wordpress/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://stephenwoods.net/wordpress</link>
	<description>Wherein I discuss whatever</description>
	<pubDate>Wed, 20 Aug 2008 08:30:00 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>Comment on Twitter flies off the rails by admin</title>
		<link>http://stephenwoods.net/wordpress/2008/05/01/twitter-flies-off-the-rails/#comment-149</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Fri, 02 May 2008 16:11:54 +0000</pubDate>
		<guid isPermaLink="false">http://stephenwoods.net/wordpress/?p=56#comment-149</guid>
		<description>I think you are right, I worked on an app that delivered emails that I think was pretty similar. We sent out "triggered" emails to about 8 million users every day. We had an event server written in C that watched the db and output a feed of change events. The notification machine ran a php script that built each email and called an email service to send the messages. We ran it on I think 4 machines total (mirrored for continuity in to colos). It took about five hours for us to send out the messages, but that was mostly because the database queries for each email were quite complex.</description>
		<content:encoded><![CDATA[<p>I think you are right, I worked on an app that delivered emails that I think was pretty similar. We sent out &#8220;triggered&#8221; emails to about 8 million users every day. We had an event server written in C that watched the db and output a feed of change events. The notification machine ran a php script that built each email and called an email service to send the messages. We ran it on I think 4 machines total (mirrored for continuity in to colos). It took about five hours for us to send out the messages, but that was mostly because the database queries for each email were quite complex.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Twitter flies off the rails by Vidar Hokstad</title>
		<link>http://stephenwoods.net/wordpress/2008/05/01/twitter-flies-off-the-rails/#comment-148</link>
		<dc:creator>Vidar Hokstad</dc:creator>
		<pubDate>Fri, 02 May 2008 09:54:03 +0000</pubDate>
		<guid isPermaLink="false">http://stephenwoods.net/wordpress/?p=56#comment-148</guid>
		<description>Actually, scaling an app the type of Twitter is really quite simple. Messaging is simple overall. I don't even like Rails, but frankly if someone fail to scale an app like Twitter with Rails, the problem is in front of the keyboard...

This is a classic multi-tier type app, where scaling Rails should be as simple as adding more boxes - there's simply no need for more than an absolutely minimal state on the frontends at all, certainly nothing you could trivially keep in memcached sessions. If they do something stupid, like trying to shovel lots of databases updates in via Rails, then they will of course run into problems (and one of my dislikes about Rails is that it makes shooting you in the foot far more easy than it need to be).

For the backend, messaging of the type Twitter does isn't hard, it's a simple matter of setting up a mesh of relatively simple servers. I commented on the Techcrunch thread that frankly there are off the shelf alternatives that will handle this nicely, notably a number of Jabber servers, which has the advantage that they're designed from the ground to be distributed, so all that's needed is to farm the userbase out over a large enough number of domains - the users never need to know. If they suffer from not-invented here syndrome, writing an efficient messaging server in Ruby isn't hard - I built one in less than 700 lines that would be trivial to mesh and that I tested up to around 2-3 million messages a day. 

Persistence adds complexity, but nothing that can't quite simply be handed by a partitioned database, or even an e-mail like system - I've done messaging queues handling huge volumes layered over e-mail before, and it sounds ugly, but it's trivial to scale and make reliable because the protocols are all well understood and you can cherrypick from so many components.

Back to the Ruby messaging server: At the 2-3 million messages/day level it took less than 10% of a single 2GHz Xeon core. Scaling it to at least 15 million on a single core on the conservative side brings us to between 120 and 240 million messages per server (assuming 8 or 16 core boxes, which seems to be most cost effective now). Assuming peaks etc. we could be generous and "only" try to handle 100million a day per 16 core box. That's less than 25 cents/month per million or so delivered messages if you go for managed hosting of rented servers, including outbound bandwidth.

I've run into my share of nasty scaling problems with Ruby, but with something that's actually tricky to handle. This isn't it.

And yes, when the problems get real hard, I do want a "scripting laguage" like Ruby to handle them - it means the easy things get out of the way trivially easily, and I can focus on the few hard bits, even if that means dipping down to C to write a tiny extension to speed something up, or sot in a tiny server in whatever other language I decide to use.

Otherwise I agree with you that Rails isn't by any means the panacea that Rails advocates tend to claim, but not because of Twitter.</description>
		<content:encoded><![CDATA[<p>Actually, scaling an app the type of Twitter is really quite simple. Messaging is simple overall. I don&#8217;t even like Rails, but frankly if someone fail to scale an app like Twitter with Rails, the problem is in front of the keyboard&#8230;</p>
<p>This is a classic multi-tier type app, where scaling Rails should be as simple as adding more boxes - there&#8217;s simply no need for more than an absolutely minimal state on the frontends at all, certainly nothing you could trivially keep in memcached sessions. If they do something stupid, like trying to shovel lots of databases updates in via Rails, then they will of course run into problems (and one of my dislikes about Rails is that it makes shooting you in the foot far more easy than it need to be).</p>
<p>For the backend, messaging of the type Twitter does isn&#8217;t hard, it&#8217;s a simple matter of setting up a mesh of relatively simple servers. I commented on the Techcrunch thread that frankly there are off the shelf alternatives that will handle this nicely, notably a number of Jabber servers, which has the advantage that they&#8217;re designed from the ground to be distributed, so all that&#8217;s needed is to farm the userbase out over a large enough number of domains - the users never need to know. If they suffer from not-invented here syndrome, writing an efficient messaging server in Ruby isn&#8217;t hard - I built one in less than 700 lines that would be trivial to mesh and that I tested up to around 2-3 million messages a day. </p>
<p>Persistence adds complexity, but nothing that can&#8217;t quite simply be handed by a partitioned database, or even an e-mail like system - I&#8217;ve done messaging queues handling huge volumes layered over e-mail before, and it sounds ugly, but it&#8217;s trivial to scale and make reliable because the protocols are all well understood and you can cherrypick from so many components.</p>
<p>Back to the Ruby messaging server: At the 2-3 million messages/day level it took less than 10% of a single 2GHz Xeon core. Scaling it to at least 15 million on a single core on the conservative side brings us to between 120 and 240 million messages per server (assuming 8 or 16 core boxes, which seems to be most cost effective now). Assuming peaks etc. we could be generous and &#8220;only&#8221; try to handle 100million a day per 16 core box. That&#8217;s less than 25 cents/month per million or so delivered messages if you go for managed hosting of rented servers, including outbound bandwidth.</p>
<p>I&#8217;ve run into my share of nasty scaling problems with Ruby, but with something that&#8217;s actually tricky to handle. This isn&#8217;t it.</p>
<p>And yes, when the problems get real hard, I do want a &#8220;scripting laguage&#8221; like Ruby to handle them - it means the easy things get out of the way trivially easily, and I can focus on the few hard bits, even if that means dipping down to C to write a tiny extension to speed something up, or sot in a tiny server in whatever other language I decide to use.</p>
<p>Otherwise I agree with you that Rails isn&#8217;t by any means the panacea that Rails advocates tend to claim, but not because of Twitter.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The horrors of transit.511.org by Michael</title>
		<link>http://stephenwoods.net/wordpress/2008/03/23/the-horrors-of-transit511org/#comment-147</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Mon, 28 Apr 2008 06:07:58 +0000</pubDate>
		<guid isPermaLink="false">http://stephenwoods.net/wordpress/2008/03/23/the-horrors-of-transit511org/#comment-147</guid>
		<description>You might be interested in a series of meetings held recently:

http://headwayblog.com/category/san-francisco/</description>
		<content:encoded><![CDATA[<p>You might be interested in a series of meetings held recently:</p>
<p><a href="http://headwayblog.com/category/san-francisco/" rel="nofollow">http://headwayblog.com/category/san-francisco/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The horrors of transit.511.org by admin</title>
		<link>http://stephenwoods.net/wordpress/2008/03/23/the-horrors-of-transit511org/#comment-135</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Sun, 30 Mar 2008 17:12:46 +0000</pubDate>
		<guid isPermaLink="false">http://stephenwoods.net/wordpress/2008/03/23/the-horrors-of-transit511org/#comment-135</guid>
		<description>Yes, seems very borked, the problem is that 511 does a meta redirect if you don't type the complete street name (Fillmore St and California St) which I am not handling properly in my scraper. If you want to use it it will work fine if you can give the full street name.</description>
		<content:encoded><![CDATA[<p>Yes, seems very borked, the problem is that 511 does a meta redirect if you don&#8217;t type the complete street name (Fillmore St and California St) which I am not handling properly in my scraper. If you want to use it it will work fine if you can give the full street name.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The horrors of transit.511.org by Laurie</title>
		<link>http://stephenwoods.net/wordpress/2008/03/23/the-horrors-of-transit511org/#comment-134</link>
		<dc:creator>Laurie</dc:creator>
		<pubDate>Sun, 30 Mar 2008 08:03:58 +0000</pubDate>
		<guid isPermaLink="false">http://stephenwoods.net/wordpress/2008/03/23/the-horrors-of-transit511org/#comment-134</guid>
		<description>I've been looking for something like this for a while, thanks! (Except that it seems to be b0rked right now...)</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been looking for something like this for a while, thanks! (Except that it seems to be b0rked right now&#8230;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Bye bye mybloglog by admin</title>
		<link>http://stephenwoods.net/wordpress/2007/12/28/bye-bye-mybloglog/#comment-86</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Sun, 30 Dec 2007 21:34:36 +0000</pubDate>
		<guid isPermaLink="false">http://stephenwoods.net/wordpress/2007/12/28/bye-bye-mybloglog/#comment-86</guid>
		<description>this is just a test comment.</description>
		<content:encoded><![CDATA[<p>this is just a test comment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Should I start a Club? by sfo</title>
		<link>http://stephenwoods.net/wordpress/2007/10/11/should-i-start-a-club/#comment-17</link>
		<dc:creator>sfo</dc:creator>
		<pubDate>Sat, 13 Oct 2007 03:40:54 +0000</pubDate>
		<guid isPermaLink="false">http://stephenwoods.net/wordpress/2007/10/11/should-i-start-a-club/#comment-17</guid>
		<description>I had no idea you were a film student!  totally forgot.</description>
		<content:encoded><![CDATA[<p>I had no idea you were a film student!  totally forgot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to get Rich in Three Steps by admin</title>
		<link>http://stephenwoods.net/wordpress/2007/09/29/how-to-get-rich-in-three-steps/#comment-13</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Sun, 30 Sep 2007 02:39:56 +0000</pubDate>
		<guid isPermaLink="false">http://stephenwoods.net/wordpress/2007/09/29/how-to-get-rich-in-three-steps/#comment-13</guid>
		<description>Good point. The product option is important too. I think I had that before and erased it. The trick to products is that the must be much less expensive to produce than they sell for. Its all about low marginal cost, which is why digital products, like software, are such a good way to get rich.</description>
		<content:encoded><![CDATA[<p>Good point. The product option is important too. I think I had that before and erased it. The trick to products is that the must be much less expensive to produce than they sell for. Its all about low marginal cost, which is why digital products, like software, are such a good way to get rich.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to get Rich in Three Steps by sfo</title>
		<link>http://stephenwoods.net/wordpress/2007/09/29/how-to-get-rich-in-three-steps/#comment-12</link>
		<dc:creator>sfo</dc:creator>
		<pubDate>Sun, 30 Sep 2007 01:40:01 +0000</pubDate>
		<guid isPermaLink="false">http://stephenwoods.net/wordpress/2007/09/29/how-to-get-rich-in-three-steps/#comment-12</guid>
		<description>hmm... what about step 4?

-Section IV-
If all else fails, develop a product.  Services are not scalable at a high enough rate of return (see also: "Do not practice a trade".)  Instead you need a product that you can sell the shit out of.  Sometimes it helps to advertise this product.  Sometimes it helps to have late night infomercials.  Either way you need to be able to sell several million copies of whatever the product is.  Bonus points are given for selling a digital product because these items are very scalable.</description>
		<content:encoded><![CDATA[<p>hmm&#8230; what about step 4?</p>
<p>-Section IV-<br />
If all else fails, develop a product.  Services are not scalable at a high enough rate of return (see also: &#8220;Do not practice a trade&#8221;.)  Instead you need a product that you can sell the shit out of.  Sometimes it helps to advertise this product.  Sometimes it helps to have late night infomercials.  Either way you need to be able to sell several million copies of whatever the product is.  Bonus points are given for selling a digital product because these items are very scalable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Enough! by sfo</title>
		<link>http://stephenwoods.net/wordpress/2007/09/25/enough/#comment-11</link>
		<dc:creator>sfo</dc:creator>
		<pubDate>Thu, 27 Sep 2007 04:50:35 +0000</pubDate>
		<guid isPermaLink="false">http://stephenwoods.net/wordpress/2007/09/25/enough/#comment-11</guid>
		<description>Hah, I smile but nod knowingly.  I hope to make friends with married couples from now on so as to miss the wedding extravaganza.  The financial reasons alone may be the catalyst for married couples hanging out together.</description>
		<content:encoded><![CDATA[<p>Hah, I smile but nod knowingly.  I hope to make friends with married couples from now on so as to miss the wedding extravaganza.  The financial reasons alone may be the catalyst for married couples hanging out together.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.833 seconds -->
