Swiftiply support for Thin
Reported by Alex MacCaw | January 30th, 2008 @ 02:44 PM | in 0.7.0
This patch gives Swiftiply (http://swiftiply.swiftcore.org/) support to Thin. It allows you to pass a --swiftiply option to Thin, with an optional authentication key. Clustering with Swiftiply also works.
Comments and changes to this ticket
-
Kevin Williams January 30th, 2008 @ 04:03 PM
- → Milestone changed from to 0.7.0
- → State changed from new to open
-

Alex MacCaw January 31st, 2008 @ 03:37 AM
Looks like a I used an old Thin repos to make the patch - a lot of things have changed since then so I'll update the patch to the lastest repos revision.
-

Alex MacCaw January 31st, 2008 @ 07:29 AM
Ok, here's the updated patch. At the moment I can get Swiftiply to do about 1226 requests per second, while nginx is around 5780.
-

-
macournoyer January 31st, 2008 @ 10:11 AM
thx Kirk, I'll wait for your feedback before applying the patch
-
macournoyer January 31st, 2008 @ 03:37 PM
post_init if @swiftiplyshould be placed at the end of Connection#process not receive_data or else the request will be resetted at each packet received.
That might be the reason why it's slower then expected.
-
macournoyer January 31st, 2008 @ 03:53 PM
I did a quick benchmarks w/ a small rails app and perf seems very much the same:
nice -n20 ab -n5000 -c3 0.0.0.0:8080/simple
Swiftiply: 109.93 req/sec
Nginx w/ unix sockets: 108.13 req/sec
-

-
macournoyer January 31st, 2008 @ 09:15 PM
uh? I think lighthouse ate your comment or something kirk, you posted the ticket description.
-

Alex MacCaw February 1st, 2008 @ 06:29 AM
I found out the reason for that performance problem (and am almost too embarrassed to admit to it). I was fetching the default index.html page, rather than doing a proper rails action. Nginx was configured for caching, so it served up that static page, while swiftiply was not. With that rectified I now get an average of 85.31 req/s for nginx, compared to 87.15 for swiftiply - which is very good for a ruby balancer. It's amazing to think that we can now deploy Rails apps with just a Ruby stack (forget about the C for the moment ;)). All anyone needs to get running is a couple of gems. They can even do the monitoring in God.
-

-

-

-
macournoyer February 9th, 2008 @ 02:14 AM
applied w/ some modifications, now on git master
thx a lot for the contribution Alex!
-
macournoyer February 9th, 2008 @ 02:16 AM
- → State changed from open to resolved
-
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
