I doubt I'll single-handedly spread the word about the caveats of using event-driven web servers (thin, evented mongrel), but I can at least give people Googling something that they may stumble upon while doing research. I want to keep it short and sweet.
If you're going to run an event-driven web server like thin or evented mongrel you have got to be careful about any requests that could run "long". File uploads, reports, and long atomic updates could leave your event chains blocked until they complete.
What this post is not...
1. It's not about Rodan, I'm just crazy and felt like putting that in the title; get over it.
2. It's not about why thin is better than mongrel or why mongrel is better than thin.
What this post is about weighing the options between these two great web servers so that you can make the right decision.
So, a couple things...
1. I use thin. And it is awesome. And I am lucky that I can use it on a site that has little "blips" for requests. So it hauls complete and utter ass.
2. I also use mongrel. And it too is awesome. And in this particular case, I DO have some long-running requests.
So what does it come down to - just educate yourself on the right tool for the right job. Don't jump ship on something just because it's the new, hip thing. I did just that when thin first started making ripples and then once site volume picked up, *poof* my requests sat in la-la land just waiting to be picked up. Anyone having flashbacks to when they were 13 waiting for their Mother to come pick them up from the mall?
I hate to jump around, but it's just how I write...I'm getting better[?]. Thin has support (oh and merb does too) to defer any long-running requests. So, as long as you're willing to configure thin and tell it which controler:action to defer to a threaded model you'll keep on servin' up those hoe-cakes just as fast as the surfer requests'em. WTF?
I should give the love here as to what triggered this post - the fine folks over at softies on rails had a quickie about thin and mongrel.
So please, weigh the differences - neither of these fantastic ruby-based servers should get any flame for under-achieving if you misuse them.
Related links...http://brainspl.at/articles/2008/04/18/deferred-requests-with-merb-ebb-and-thin
Strengthening the Ruby Ecosystem II: Merb
Showing posts with label thin. Show all posts
Showing posts with label thin. Show all posts
Sunday, April 27, 2008
Wednesday, February 6, 2008
Application Throughput is for Closers Only
After reading a few informative posts and some statistics on application deployments and their performance with rails and the growing number of available proxies/webservers, I thought I'd take my shot at putting something fast together on a not-so beefy machine.
Read this article first and then this (Thin), this (Garbage Collection in Rails) and then this (Rails Routing).
Ok, ok, you probably didn't reall all of those...but at least read the first one. My goal is to try to bake all these together with an app that will actually do something outside of "hello, world" and see what type of performance I can juice out of an Ubuntu (Gibbon) box running on a 1.8Ghz AMD and 1.5Gb RAM. I have a fairly lightweight financial management application I've built on rails that is a perfect candidate for this type of experiment.
What's going to be involved? Nginx, Swiftiply, Thin, Postgresql and of course Rails. Now I'd like to mention here that currently (correct me if I'm wrong) there isn't a patch to run Thin via Swiftiply - I plan on changing that now that I don't have to huddle my family into a crawl space due to the 8,000 tornado warnings we had last night. It's like the world didn't want me to implement it!
Anyway, I'll post progress as I make it - if nothing else it's going to be a fun learning experience. Maybe some notoriety will come about from it if I can tie Thin into Swiftiply "un-shittily" (I'm sure someone will bitch about something).
That's all for now.
Read this article first and then this (Thin), this (Garbage Collection in Rails) and then this (Rails Routing).
Ok, ok, you probably didn't reall all of those...but at least read the first one. My goal is to try to bake all these together with an app that will actually do something outside of "hello, world" and see what type of performance I can juice out of an Ubuntu (Gibbon) box running on a 1.8Ghz AMD and 1.5Gb RAM. I have a fairly lightweight financial management application I've built on rails that is a perfect candidate for this type of experiment.
What's going to be involved? Nginx, Swiftiply, Thin, Postgresql and of course Rails. Now I'd like to mention here that currently (correct me if I'm wrong) there isn't a patch to run Thin via Swiftiply - I plan on changing that now that I don't have to huddle my family into a crawl space due to the 8,000 tornado warnings we had last night. It's like the world didn't want me to implement it!
Anyway, I'll post progress as I make it - if nothing else it's going to be a fun learning experience. Maybe some notoriety will come about from it if I can tie Thin into Swiftiply "un-shittily" (I'm sure someone will bitch about something).
That's all for now.
Subscribe to:
Posts (Atom)