#28 ✓resolved
Alex MacCaw

Swiftiply support for Thin

Reported by Alex MacCaw | May 1st, 2008 @ 11:34 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

    Kevin Williams January 30th, 2008 @ 04:03 PM

    • State changed from “new” to “open”
    • Milestone set to 0.7.0
  • Alex MacCaw

    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

    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

    macournoyer January 31st, 2008 @ 10:11 AM

    thx Kirk, I'll wait for your feedback before applying the patch

  • macournoyer

    macournoyer January 31st, 2008 @ 03:37 PM

    post_init if @swiftiply
    

    should 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

    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

    macournoyer January 31st, 2008 @ 09:15 PM

    uh? I think lighthouse ate your comment or something kirk, you posted the ticket description.

  • Alex MacCaw

    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

    macournoyer February 9th, 2008 @ 02:14 AM

    applied w/ some modifications, now on git master

    thx a lot for the contribution Alex!

  • macournoyer

    macournoyer February 9th, 2008 @ 02:16 AM

    • State changed from “open” to “resolved”
  • Matt Todd

    Matt Todd February 9th, 2008 @ 03:10 PM

    /me applauds excitedly!

  • John

    John March 16th, 2024 @ 09:30 AM

    • Tag set to cluster

    Kaikella kunnioituksella,Nettikasinot voivat olla sekä hyviä että huonoja lompakollesi. Jos katsot mr bet-kasinoa, huomaat, että se voi auttaa sinua lopettamaan vihaamasi työn, hän sanoi, De acordo com as estatísticas, este cassino on-line tem o RTP mais https://mrbet-casinoplay.com/fi/ alto

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Attachments

Tags

Pages