<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Brainspl.at: Event Driven Mongrel and Swiftiply Proxy</title>
    <link>http://brainspl.at/articles/2007/05/12/event-driven-mongrel-and-swiftiply-proxy</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Brainspl.at</description>
    <item>
      <title>"Event Driven Mongrel and Swiftiply Proxy" by Saimon Moore</title>
      <description>"swifiplied_mongrel does everything evented_mongrel does, plus a little bit."

So when using with nginx is there any reason to uses evented mongrel?

In order to migrate my current nginx &gt; mongrel setup should I get nginx to proxy to swiftiply (on a custom port) and then startup either evented or swiftiplied mongrels?</description>
      <pubDate>Wed, 30 May 2007 05:41:00 +0000</pubDate>
      <guid>urn:uuid:20b697e0-69a2-48e9-a66d-5810d5c591a9</guid>
      <link>http://brainspl.at/articles/2007/05/12/event-driven-mongrel-and-swiftiply-proxy#comment-4473</link>
    </item>
    <item>
      <title>"Event Driven Mongrel and Swiftiply Proxy" by Kirk Haines</title>
      <description>Argh! That was a brain burp when I wrote the docs.  It's always been EVENT and SWIFT.  Fixing that right now.</description>
      <pubDate>Thu, 24 May 2007 03:03:00 +0000</pubDate>
      <guid>urn:uuid:46d61b36-a68b-4d5f-8a42-74fc5d8b1c68</guid>
      <link>http://brainspl.at/articles/2007/05/12/event-driven-mongrel-and-swiftiply-proxy#comment-4453</link>
    </item>
    <item>
      <title>"Event Driven Mongrel and Swiftiply Proxy" by Jim Kane</title>
      <description>For those of you who choose to step onto the bleeding edge, note that the docs are slightly out of date for 0.5.1.  The env var for turning on swiftiplied mode is now SWIFT instead of SWIFTIPLY.</description>
      <pubDate>Wed, 23 May 2007 19:34:22 +0000</pubDate>
      <guid>urn:uuid:ec4bceb8-1b82-4baf-b245-b638246344c5</guid>
      <link>http://brainspl.at/articles/2007/05/12/event-driven-mongrel-and-swiftiply-proxy#comment-4452</link>
    </item>
    <item>
      <title>"Event Driven Mongrel and Swiftiply Proxy" by Kirk Haines</title>
      <description>&lt;p&gt;Agres,&lt;/p&gt;

&lt;p&gt;Good question.  I'll write up more information on this whole topic for the website. But, in short:&lt;/p&gt;

&lt;p&gt;If you are running nginx right now, the simplest thing is to just use evented_mongrel.&lt;/p&gt;

&lt;p&gt;swiftiplied_mongrel is event based, as well.  The reason evented_mongrel exists is mostly because I got it for free while creating swiftiplied_mongrel -- swifiplied_mongrel does everything evented_mongrel does, plus a little bit.&lt;/p&gt;

&lt;p&gt;If you use Swiftiply with Mongrel, you would do it with swiftiplied_mongrel.&lt;/p&gt;

&lt;p&gt;If you used it behind nginx, you would have nginx proxy to Swiftiply in the same way you would if you were using haproxy, pen, or something else in that spot.&lt;/p&gt;</description>
      <pubDate>Wed, 23 May 2007 15:01:16 +0000</pubDate>
      <guid>urn:uuid:d11229e8-be01-47e9-9256-661d51cd532d</guid>
      <link>http://brainspl.at/articles/2007/05/12/event-driven-mongrel-and-swiftiply-proxy#comment-4450</link>
    </item>
    <item>
      <title>"Event Driven Mongrel and Swiftiply Proxy" by Agres</title>
      <description>So, how to make all of this play nice with nginx? :)
Switching from Nginx-&gt;Mongrel to Nginx-&gt;Swiftiply-&gt;Evented Mongrel?

Or its better to go just Swiftiply-&gt;Evented Mongrel?

</description>
      <pubDate>Wed, 23 May 2007 08:41:41 +0000</pubDate>
      <guid>urn:uuid:c35f2766-129e-4a41-96e6-c8750ae1ad78</guid>
      <link>http://brainspl.at/articles/2007/05/12/event-driven-mongrel-and-swiftiply-proxy#comment-4449</link>
    </item>
    <item>
      <title>"Event Driven Mongrel and Swiftiply Proxy" by W. Andrew Loe III</title>
      <description>&lt;p&gt;For those curious about Mongrel vs Evented Mongrel on some generic hardware (Celeron 2.4, 512MB RAM running Debian).
&lt;a href="http://journal.andrewloe.com/2007/5/22/mongrel-vs-evented-mongrel" rel="nofollow"&gt;http://journal.andrewloe.com/2007/5/22/mongrel-vs-evented-mongrel&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;I did 3 tests of 5000 requests with a concurrency of 1, both Mongrel and Evented Mongrel achieved about 270 req/sec. When the concurrency was bumped to 10, Mongrel fell to 120 req/sec whereas Evented Mongrel was able to maintain pace at 270 req/sec.&lt;/p&gt;</description>
      <pubDate>Tue, 22 May 2007 05:46:12 +0000</pubDate>
      <guid>urn:uuid:8fc6d9d3-6a5f-4f43-8c29-a399a668fb2d</guid>
      <link>http://brainspl.at/articles/2007/05/12/event-driven-mongrel-and-swiftiply-proxy#comment-4447</link>
    </item>
    <item>
      <title>"Event Driven Mongrel and Swiftiply Proxy" by Kirk Haines</title>
      <description>EventMachine is currently released under the GPL.

If it makes sense to turn evented_mongrel/swiftiplied_mongrel into a full fledged fork, then so be it.

I'll get a mailing list started up for swiftiply discussions.  This is something that can be explored better in that medium, I think.</description>
      <pubDate>Mon, 21 May 2007 23:04:29 +0000</pubDate>
      <guid>urn:uuid:51730be8-6cb7-488e-a513-d0374ad0d84b</guid>
      <link>http://brainspl.at/articles/2007/05/12/event-driven-mongrel-and-swiftiply-proxy#comment-4446</link>
    </item>
    <item>
      <title>"Event Driven Mongrel and Swiftiply Proxy" by Jeremy</title>
      <description>I asked Zed this at Railsconf. From what I gathered, there's no interest in pulling this into Mongrel directly, because of some licensing issues with EventMachine. He expressed that if the evented_mongrel worked well for you and you trusted the code, more power to you. Zed also previously wrote an Ruby/Event when he was working on SCGI (pre-mongrel), so there's a possibility he might pick that back up in the future.</description>
      <pubDate>Mon, 21 May 2007 16:21:38 +0000</pubDate>
      <guid>urn:uuid:fc8c5c65-1c5c-4bd4-be26-48cf56553fcd</guid>
      <link>http://brainspl.at/articles/2007/05/12/event-driven-mongrel-and-swiftiply-proxy#comment-4444</link>
    </item>
    <item>
      <title>"Event Driven Mongrel and Swiftiply Proxy" by Nick (nickjost@yahoo.com)</title>
      <description>Actually I have the same question and it becomes a concern, not right now, but in the future.  Are there talks going on?  If its a patch its a fork.  If talks are going on then a future patch of Mongrel becomes much safer to me/</description>
      <pubDate>Mon, 21 May 2007 15:49:50 +0000</pubDate>
      <guid>urn:uuid:08e478c7-b134-4d17-bb1c-f8bcc0771003</guid>
      <link>http://brainspl.at/articles/2007/05/12/event-driven-mongrel-and-swiftiply-proxy#comment-4443</link>
    </item>
    <item>
      <title>"Event Driven Mongrel and Swiftiply Proxy" by Kirk Haines</title>
      <description>Eliot,

I don't think either evented_mongrel or swiftiplied_mongrel is a fork of Mongrel, right now.  I intentionally did not package up a complete mongrel source with my patches applied.

Instead, right now, it is more of an extension on Mongrel that is intended to be transparent to whatever Mongrel handlers are being used; they shouldn't know that they are not running on the standard Mongrel.


Kirk Haines</description>
      <pubDate>Mon, 21 May 2007 01:08:19 +0000</pubDate>
      <guid>urn:uuid:b0eb71d3-eb62-4c2a-a7ed-3c91e686f1b4</guid>
      <link>http://brainspl.at/articles/2007/05/12/event-driven-mongrel-and-swiftiply-proxy#comment-4439</link>
    </item>
    <item>
      <title>"Event Driven Mongrel and Swiftiply Proxy" by Eliot</title>
      <description>Does Zed seem interested in integrating the EventMachine stuff or does this amount to a fork of Mongrel?</description>
      <pubDate>Fri, 18 May 2007 23:41:00 +0000</pubDate>
      <guid>urn:uuid:b71dca67-2845-4f8a-b4e1-757c74e344b1</guid>
      <link>http://brainspl.at/articles/2007/05/12/event-driven-mongrel-and-swiftiply-proxy#comment-4432</link>
    </item>
    <item>
      <title>"Event Driven Mongrel and Swiftiply Proxy" by Nick</title>
      <description>Wonderful change.  I'm not a fan of the lighthttpd/fastcgi set up and this let's me use mongrel with the possibility of one day doing swiftiply/mongrel.</description>
      <pubDate>Fri, 18 May 2007 16:18:31 +0000</pubDate>
      <guid>urn:uuid:5675a897-40b4-470e-9745-35a4b3ef9bbe</guid>
      <link>http://brainspl.at/articles/2007/05/12/event-driven-mongrel-and-swiftiply-proxy#comment-4428</link>
    </item>
    <item>
      <title>"Event Driven Mongrel and Swiftiply Proxy" by Kirk Haines</title>
      <description>Just FYI, but a 0.5.1 has been released that fixes several reported bugs.</description>
      <pubDate>Tue, 15 May 2007 04:40:21 +0000</pubDate>
      <guid>urn:uuid:f49ac565-d81d-4e51-821f-2d06507261dd</guid>
      <link>http://brainspl.at/articles/2007/05/12/event-driven-mongrel-and-swiftiply-proxy#comment-4421</link>
    </item>
    <item>
      <title>"Event Driven Mongrel and Swiftiply Proxy" by Paul</title>
      <description>What about a comparison to  Apache/mod_proxy_balance?</description>
      <pubDate>Mon, 14 May 2007 18:52:48 +0000</pubDate>
      <guid>urn:uuid:0c0986a1-6560-4519-b599-133b1ae96c58</guid>
      <link>http://brainspl.at/articles/2007/05/12/event-driven-mongrel-and-swiftiply-proxy#comment-4419</link>
    </item>
    <item>
      <title>"Event Driven Mongrel and Swiftiply Proxy" by Kirk Haines</title>
      <description>Just FYI.  I'll be releasing a 0.5.1 that fixes a few bugs, tomorrow.</description>
      <pubDate>Mon, 14 May 2007 05:28:57 +0000</pubDate>
      <guid>urn:uuid:28d52d75-de3d-4692-99f9-0c936de1b11b</guid>
      <link>http://brainspl.at/articles/2007/05/12/event-driven-mongrel-and-swiftiply-proxy#comment-4417</link>
    </item>
    <item>
      <title>"Event Driven Mongrel and Swiftiply Proxy" by Kirk Haines</title>
      <description>Ah!  An updated EM gem was going to be uploaded, but Francis C. was travelling all week, so that may not be done yet.  I bet that is where the trouble lies.</description>
      <pubDate>Mon, 14 May 2007 00:57:22 +0000</pubDate>
      <guid>urn:uuid:06362c88-eee0-49bb-99ff-02e479e837ea</guid>
      <link>http://brainspl.at/articles/2007/05/12/event-driven-mongrel-and-swiftiply-proxy#comment-4416</link>
    </item>
    <item>
      <title>"Event Driven Mongrel and Swiftiply Proxy" by Luis Lavena</title>
      <description>Kirk, no, I'm on Windows, but event-machine tests failed on me, they are broken or Windows it is ;-)

Didn't jump to swiftiply yet, will do this week and check stability of a few applications.

Anyway, mail you later about Win32 issues (if they show up).</description>
      <pubDate>Sun, 13 May 2007 22:42:10 +0000</pubDate>
      <guid>urn:uuid:38167532-78cf-4bb7-8a8f-5fc3459ffcda</guid>
      <link>http://brainspl.at/articles/2007/05/12/event-driven-mongrel-and-swiftiply-proxy#comment-4415</link>
    </item>
    <item>
      <title>"Event Driven Mongrel and Swiftiply Proxy" by Kirk Haines</title>
      <description>Luis, are you on OSX, too?
&lt;br /&gt;
Scott sent me his little test script, and on my systems I can't get a single failure.
&lt;br/&gt;
I tested it with up to 100k requests at concurrencies from 1 to 100.  No failures at all.  They all look pretty much like this:
&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;
Concurrency Level:      100&lt;br /&gt;
Time taken for tests:   19.542144 seconds&lt;br /&gt;
Complete requests:      100000&lt;br /&gt;
Failed requests:        0&lt;br /&gt;
Write errors:           0&lt;br /&gt;
Total transferred:      252200000 bytes&lt;br /&gt;
HTML transferred:       240000000 bytes&lt;br /&gt;
Requests per second:    5117.15 [#/sec] (mean)&lt;br /&gt;
Time per request:       19.542 [ms] (mean)&lt; br /&gt;
Time per request:       0.195 [ms] (mean, across all concurrent requests)&lt;br /&gt;
Transfer rate:          12602.97 [Kbytes/sec] received&lt;br /&gt;
&lt;/code&gt;
&lt;br /&gt;
I do not have an OSX machine to test with, though, so that might be the common thread in these failure reports.</description>
      <pubDate>Sun, 13 May 2007 18:26:19 +0000</pubDate>
      <guid>urn:uuid:0339cf41-96b4-4d8e-83a8-d8ff365c96ca</guid>
      <link>http://brainspl.at/articles/2007/05/12/event-driven-mongrel-and-swiftiply-proxy#comment-4414</link>
    </item>
    <item>
      <title>"Event Driven Mongrel and Swiftiply Proxy" by Luis Lavena</title>
      <description>Thanks Kirk, doing some testing on event-machine alone, but tests fails (and segmentation fault), will investigate further later.</description>
      <pubDate>Sun, 13 May 2007 15:06:52 +0000</pubDate>
      <guid>urn:uuid:1dee33e2-c9a8-478a-96fc-a0d77fb578a3</guid>
      <link>http://brainspl.at/articles/2007/05/12/event-driven-mongrel-and-swiftiply-proxy#comment-4413</link>
    </item>
    <item>
      <title>"Event Driven Mongrel and Swiftiply Proxy" by Kirk Haines</title>
      <description>Jeremy, thanks.  I will address that ASAP.
</description>
      <pubDate>Sun, 13 May 2007 14:41:55 +0000</pubDate>
      <guid>urn:uuid:1366ccad-dfc7-47d1-8272-adeb248125d8</guid>
      <link>http://brainspl.at/articles/2007/05/12/event-driven-mongrel-and-swiftiply-proxy#comment-4412</link>
    </item>
    <item>
      <title>"Event Driven Mongrel and Swiftiply Proxy" by Jeremy</title>
      <description>It seems as though the evented_mongrel does not handle invalid http format gracefully, at last for me:

/usr/lib/ruby/gems/1.8/gems/swiftiply-0.5.0/src/swiftcore/evented_mongrel.rb:33:in `execute': Invalid HTTP format, parsing fails. (Mongrel::HttpParserError)
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:293:in `join'
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:293:in `join'
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:293:in `each'
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:293:in `join'
        from /usr/lib/ruby/gems/1.8/gems/swiftiply-0.5.0/bin/mongrel_rails:145:in `run'
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run'
        from /usr/lib/ruby/gems/1.8/gems/swiftiply-0.5.0/bin/mongrel_rails:252
        from /usr/bin/mongrel_rails:18:in `load'
        from /usr/bin/mongrel_rails:18</description>
      <pubDate>Sun, 13 May 2007 13:50:11 +0000</pubDate>
      <guid>urn:uuid:1206c5e9-4f77-45c7-a2f4-e6c929114743</guid>
      <link>http://brainspl.at/articles/2007/05/12/event-driven-mongrel-and-swiftiply-proxy#comment-4411</link>
    </item>
    <item>
      <title>"Event Driven Mongrel and Swiftiply Proxy" by Kirk Haines</title>
      <description>Scott, would you email me details about what you are doing so that I can try to reproduce it.  I've not seen anything like that in my hammering and abusing of this code.

Same with you, Lourens.  Could you email me the details of what you are doing?


Thanks,

Kirk Haines</description>
      <pubDate>Sun, 13 May 2007 13:26:06 +0000</pubDate>
      <guid>urn:uuid:2181dc5e-adc1-4bff-a96f-b11a85237c7e</guid>
      <link>http://brainspl.at/articles/2007/05/12/event-driven-mongrel-and-swiftiply-proxy#comment-4410</link>
    </item>
    <item>
      <title>"Event Driven Mongrel and Swiftiply Proxy" by Lourens Naude</title>
      <description>Excellent find.

However, on startup it doesn't seem to queue requests the way stock Mongrel does and have to do a 2 or 3 second 'sleep' in my Capistrano restart task to avoid 500's being raised.

Anyone else experience the same?
</description>
      <pubDate>Sun, 13 May 2007 12:50:22 +0000</pubDate>
      <guid>urn:uuid:37825057-9d4a-4112-9bda-c77a34816645</guid>
      <link>http://brainspl.at/articles/2007/05/12/event-driven-mongrel-and-swiftiply-proxy#comment-4409</link>
    </item>
    <item>
      <title>"Event Driven Mongrel and Swiftiply Proxy" by Scott Fleckenstein</title>
      <description>Exciting Stuff!  Free speed boosts for all!

Using the simplest  of hello world mongrel handlers, I was getting 3000+ requests per second, nearly 3x what I get for mongrel alone.  Granted, that is  imaginary world...

Weird issue i'm getting though, the server seems to fail when load is sustained:

 ab -v -c 1 -n 55000 http://localhost:9998/

nets about 30000 failed requests whereas pure mongrel just chugs along.

This is really exciting though, i'm looking forward to your next post on swiftiply.

</description>
      <pubDate>Sun, 13 May 2007 07:11:54 +0000</pubDate>
      <guid>urn:uuid:cd3ec76b-0c7c-4269-8c10-fa58ed853eb6</guid>
      <link>http://brainspl.at/articles/2007/05/12/event-driven-mongrel-and-swiftiply-proxy#comment-4407</link>
    </item>
    <item>
      <title>"Event Driven Mongrel and Swiftiply Proxy" by Kirk Haines</title>
      <description>Luis, it should work on Windows, but I admit that I haven't tested it on Windows, yet.  If I am not to busy with family stuff tomorrow, I'll check it and see if I run into any issues.</description>
      <pubDate>Sun, 13 May 2007 04:13:49 +0000</pubDate>
      <guid>urn:uuid:6385c9eb-6341-4bfc-b647-2c5124509b46</guid>
      <link>http://brainspl.at/articles/2007/05/12/event-driven-mongrel-and-swiftiply-proxy#comment-4406</link>
    </item>
    <item>
      <title>Event Driven Mongrel and Swiftiply Proxy</title>
      <description>&lt;p&gt;Kirk Haines of the &lt;span class="caps"&gt;IOWA&lt;/span&gt; project has finally released his swiftiply package. I&amp;#8217;m really excited about this project. The project has a few parts. There is a monkey patch to Mongrel that rips out ruby&amp;#8217;s threading and Socket classes and replaces them with an eventmachine event loop. I have been testing this evented mongrel extensively for the past few weeks and it is notably faster and higher throughput then normal multi threaded mongrel.&lt;/p&gt;


	&lt;p&gt;It&amp;#8217;s a drop in compatible with rails and merb and should work with any custom mongrel handlers you have. Once you install the swiftiply package you can start mongrel_rails with the new evented mongrel like this:&lt;/p&gt;


	&lt;p&gt;$ &lt;span class="caps"&gt;EVENT&lt;/span&gt;=1 mongrel_rails start&lt;/p&gt;


	&lt;p&gt;I am getting a huge speedup in merb from evented mongrel. And rails apps run very stable and do not start to slow down and bloat under high concurrent load like threaded mongrel does.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;This is big news people. This thing makes shit faster and more stable under load&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;Now that it the easy way to get started with evented mongrel and buy yourself some performance. But the swiftiply proxy is also very very cool.&lt;/p&gt;


	&lt;p&gt;Swiftiply works differently from a traditional proxy.  In Swiftiply, the
backend processes are clients of the Swiftiply server&amp;#8212;they make persistent
socket connections to Swiftiply.  One of the major advantages to this
architecture is that it allows one to start or stop backend processes at will,
with no configuration of the proxy.  The obvious disadvantage is that this is
not behavior that backends typically expect.&lt;/p&gt;


	&lt;p&gt;Luckily there is a swiftiplied version of mongrel in this package as well. I&amp;#8217;ll make another post about how to use swiftiply later.&lt;/p&gt;


	&lt;p&gt;A week or so ago I was able to speed merb up from 299req/sec fro hello world to 620req/sec. Well dropping in evented mongrel gets merb&amp;#8217;s hello world to a blazing 987req/sec!! no bull, see this pastie:&lt;/p&gt;


	&lt;p&gt;&lt;a href='http://pastie.caboo.se/57881'&gt;http://pastie.caboo.se/57881&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;So go grab swiftiply and play around a bit. I am using this in production for more then a week now with no adverse affects and the app that runs it has much better response times and memory usage then it did before.&lt;/p&gt;


	&lt;p&gt;&lt;a href='http://swiftiply.swiftcore.org/index.html'&gt;http://swiftiply.swiftcore.org/index.html&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Sat, 12 May 2007 08:49:00 +0000</pubDate>
      <guid>urn:uuid:de2f9de2-c7a2-49a7-95a0-ec2ea1213278</guid>
      <author>ezmobius</author>
      <link>http://brainspl.at/articles/2007/05/12/event-driven-mongrel-and-swiftiply-proxy</link>
      <category>merb</category>
      <category>mongrel</category>
      <category>event</category>
      <trackback:ping>http://brainspl.at/articles/trackback/4398</trackback:ping>
    </item>
  </channel>
</rss>

