#28 ✓resolved
Alex MacCaw

Swiftiply support for Thin

Reported by Alex MacCaw | 2008-05-01 23:34:02 UTC | 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 2008-01-30 16:03:23 UTC

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

    Alex MacCaw 2008-01-31 03:37:01 UTC

    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 2008-01-31 07:29:31 UTC

    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 2008-01-31 10:11:30 UTC

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

  • macournoyer

    macournoyer 2008-01-31 15:37:54 UTC

    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 2008-01-31 15:53:25 UTC

    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 2008-01-31 21:15:21 UTC

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

  • Alex MacCaw

    Alex MacCaw 2008-02-01 06:29:32 UTC

    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 2008-02-09 02:14:44 UTC

    applied w/ some modifications, now on git master

    thx a lot for the contribution Alex!

  • macournoyer

    macournoyer 2008-02-09 02:16:37 UTC

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

    Matt Todd 2008-02-09 15:10:45 UTC

    /me applauds excitedly!

  • John

    John 2024-03-16 09:30:22 UTC

    • 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