[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[ANN] Thin 0.5.1 LOLCAT released

Marc-André Cournoyer

1/8/2008 6:09:00 AM

Hey all,
Version 0.5.1 (codename LOLCAT) of the fastest Ruby server is out!
Thin is a Ruby web server that glues together 3 of the best Ruby
libraries in web history:
* the Mongrel parser: the root of Mongrel speed and security
* Event Machine: a network I/O library with extremely high scalability,
performance and stability
* Rack: a minimal interface between webservers and Ruby frameworks
Which makes it, with all humility, the most secure, stable, fast and
extensible Ruby web server
bundled in an easy to use gem for your own pleasure.
== What's new?
Even though Thin has been made public only 4 days ago, lots of things
have happened since:
* Ruby 1.9 compatibility
* Better Rails adapter
* Thin support included in Ramaze and Vintage frameworks (Thin can also
run Rails, Camping, Merb and more)
* Some bug fixes in header parsing
And some amazing numbers:
[~/projects/thin] ruby benchmark/simple.rb
server request concurrency req/s failures
=====================================================
WEBrick 1000 1 389.31 0
Mongrel 1000 1 1495.70 0
EMongrel 1000 1 2070.35 0
Thin 1000 1 2219.45 0
WEBrick 1000 10 366.16 0
Mongrel 1000 10 1501.02 0
EMongrel 1000 10 2562.43 0
Thin 1000 10 3129.64 0
WEBrick 1000 100 ERROR
Mongrel 1000 100 1500.82 0
EMongrel 1000 100 3031.29 0
Thin 1000 100 3372.49 0
[~/projects/thin] ruby19 benchmark/simple.rb
server request concurrency req/s failures
=====================================================
WEBrick 1000 1 506.33 0
Mongrel 1000 1 1768.31 0
Thin 1000 1 2528.11 0
WEBrick 1000 10 461.66 0
Mongrel 1000 10 1541.35 0
Thin 1000 10 4003.19 0
WEBrick 1000 100 ERROR
Mongrel 1000 100 1313.19 0
Thin 1000 100 4154.67 0
== Get it!
sudo gem install thin
(Might take some time for the gem mirrors to be updated, try adding
--source http://code.macou... to the command if it doesn't work)
== Contribute
Thin is driven by an active community of passionate coders and
benchmarkers. Please join us, contribute
or share some ideas in Thin Google Group:
http://groups.google.com/group/thin-r...
Also on IRC: #thin on freenode
Thanks to all the people who contributed to Thin, EventMachine, Rack and
Mongrel.
Marc-Andre Cournoyer
http://code.macou.../thin/
--
Posted via http://www.ruby-....

12 Answers

Steve Ross

1/8/2008 6:54:00 AM

0

On Jan 7, 2008, at 10:09 PM, Marc-andre Marc wrote:

> And some amazing numbers:
> [~/projects/thin] ruby benchmark/simple.rb
> server request concurrency req/s failures
> =====================================================
> Thin 1000 1 2219.45 0

Very cool. I just benchmarked (very crude localhost-only numbers) a
form page in Rails that hits a MySQL database. I would have expected
database and template rendering to be a far bigger factor, but here
are the numbers on my mbp (Ruby 1.8.6p111):

mongrel n=1000 c = 1 : 44.45
thin n=1000 c = 1 : 51.29
mongrel n=1000 c = 10 : 40.12
thin n=1000 c = 10 : 51.27
mongrel n=1000 c = 100 : 35.94
thin n=1000 c = 100 : 50.86

Now, I can't serve as many pages as you can (2200+!), but 50r/s is
still over 4 million pages served per day. I'm sure with a "thin
cluster," you can pretty much serve pages at will!


Ollivier Robert

1/8/2008 10:24:00 AM

0

In article <80115978203f21faee3d098626d2558b@ruby-forum.com>,
Marc-andre Marc <macournoyer@gmail.com> wrote:
> * Ruby 1.9 compatibility

Good!

> * Better Rails adapter

Is rails 1.2.6 compatible with 1.9 BTW or do I need to move on to Rails2? My
main site is built with RadiantCMS and I'd like to move to 1.9... (yes I
understand it is development but I follow 1.9/trunk already anyway).

Is there IPv6 support for thin? I can run a plain mongrel server on ::1 but
thin seems to puke.

Thanks for thin!
--
Ollivier ROBERT -=- EEC/RIF/SEU -=-
Systems Engineering Unit

Xavier Noria

1/8/2008 10:37:00 AM

0

On Jan 8, 2008, at 11:25 AM, Ollivier Robert wrote:

> Is rails 1.2.6 compatible with 1.9 BTW or do I need to move on to
> Rails2? My
> main site is built with RadiantCMS and I'd like to move to 1.9...
> (yes I
> understand it is development but I follow 1.9/trunk already anyway).

Rails is not 1.9 compatible at this moment, this is work in progress
in edge.

-- fxn


Joachim Glauche

1/8/2008 11:50:00 AM

0

Marc-andre Marc wrote:
> http://code.macournoyer...

Does your website use Thin?

I get a timeout...
--
Posted via http://www.ruby-....

Marc-André Cournoyer

1/8/2008 12:28:00 PM

0

@Steve: very nice! thx for benchmarking with Rails!

@Ollivier: like Xavier mentioned, Rails is not yet Ruby 1.9 compatible.
Rails core team working on this right now, but it's gonna be in next
Rails version, better update now to Rails 2.
I ddin't know about mongrel IPv6 support, I'll give it a look, thx!

@Joachim: no the website is a set of static HTML pages hosted on
DreamHost

thx for the comments, glad you like my project!
--
Posted via http://www.ruby-....

Ollivier Robert

1/8/2008 1:12:00 PM

0

In article <db91d750672f6ae0e01224cf7780e75c@ruby-forum.com>,
Marc-andre Marc <macournoyer@gmail.com> wrote:
>I ddin't know about mongrel IPv6 support, I'll give it a look, thx!

Thanks.

It is not critical per-se as I have an IPv6-enabled Apache in front of
mongrel/thin for URL filtering/rewriting anyway but it would be better to keep
IPv6 support in, especially when mongrel has it.

--
Ollivier ROBERT -=- EEC/RIF/SEU -=-
Systems Engineering Unit

Radoslaw Bulat

1/9/2008 2:49:00 AM

0

V293LCBJJ20gaW1wcmVzc2VkIHdpdGggVGhpbiBwZXJmb3JtYW5jZSA6KS4KCkkgbm90aWNlZCB0
aGF0IC5pcmJyYyBmaWxlIGlzIGxvYWRlZCBhbmQgaXQncyBsb2FkZWQgZXZlcnkgcmVxdWVzdCEg
SXMKaXQgaW50ZW50aW9uYWxseT8gSG93IHRvIGRpc2FibGUgdGhpcyBiZWhhdmlvdXI/CgotLSAK
UmFkb3OzYXcgQnWzYXQKCmh0dHA6Ly9yYWRhcmVrLmpvZ2dlci5wbCAtIG3zaiBibG9nCg==

Marc-André Cournoyer

1/9/2008 3:03:00 AM

0

RadosÅ?aw BuÅ?at wrote:
> I noticed that .irbrc file is loaded and it's loaded every request! Is
> it intentionally? How to disable this behaviour?

Very weird. I've tried raising an error in my .irbrc file to see if it's
loaded and it's not.

Are you using breakpointer or something like this. Seems like it can
cause this kind of error: http://dev.rubyonrails.org/...

What the content of your .irbrc file ?
--
Posted via http://www.ruby-....

Ollivier Robert

1/9/2008 1:26:00 PM

0

In article <db91d750672f6ae0e01224cf7780e75c@ruby-forum.com>,
Marc-andre Marc <macournoyer@gmail.com> wrote:
>I ddin't know about mongrel IPv6 support, I'll give it a look, thx!

While I'm here, would you care to use the same options as mongrel? It would
certainly help moving from one to the other (e.g. -a vs -o in thin).

I'd also argue that -c (chdir) is renamed to -C and use -c for specifying a
config file (hmmm, thin does not support this...).

--
Ollivier ROBERT -=- EEC/RIF/SEU -=-
Systems Engineering Unit

Marc-André Cournoyer

1/9/2008 2:46:00 PM

0

Ollivier Robert wrote:
> While I'm here, would you care to use the same options as mongrel? It
> would
> certainly help moving from one to the other (e.g. -a vs -o in thin).
>
> I'd also argue that -c (chdir) is renamed to -C and use -c for
> specifying a
> config file (hmmm, thin does not support this...).

Hey Ollivier,

Someone already mentioned this on Thin group:
http://groups.google.com/group/thin-ruby/browse_thread/thread/678862...
it's already on git and will be part of the next release

As for the -c, it already behaves like the mongrel_rails script:

mongrel_rails:
-c, --chdir PATH Change to dir before starting (will be
expanded)

thin:
-c, --chdir PATH Change to dir before starting

thx for using Thin!
--
Posted via http://www.ruby-....