[ANN] Thin 0.5.1 LOLCAT released

  • Thread starter Marc-andre Marc
  • Start date
M

Marc-andre Marc

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.macournoyer.com 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-ruby/topics
Also on IRC: #thin on freenode
Thanks to all the people who contributed to Thin, EventMachine, Rack and
Mongrel.
Marc-Andre Cournoyer
http://code.macournoyer.com/thin/
 
S

s.ross

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!
 
O

Ollivier Robert

* 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!
 
X

Xavier Noria

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
 
M

Marc-andre Marc

@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!
 
O

Ollivier Robert

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.
 
R

Rados³aw Bu³at

V293LCBJJ20gaW1wcmVzc2VkIHdpdGggVGhpbiBwZXJmb3JtYW5jZSA6KS4KCkkgbm90aWNlZCB0
aGF0IC5pcmJyYyBmaWxlIGlzIGxvYWRlZCBhbmQgaXQncyBsb2FkZWQgZXZlcnkgcmVxdWVzdCEg
SXMKaXQgaW50ZW50aW9uYWxseT8gSG93IHRvIGRpc2FibGUgdGhpcyBiZWhhdmlvdXI/CgotLSAK
UmFkb3OzYXcgQnWzYXQKCmh0dHA6Ly9yYWRhcmVrLmpvZ2dlci5wbCAtIG3zaiBibG9nCg==
 
M

Marc-andre Marc

Radosław Bułat said:
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/ticket/803

What the content of your .irbrc file ?
 
O

Ollivier Robert

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...).
 
M

Marc-andre Marc

Ollivier said:
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/678862834040a4e1
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!
 
R

Rados³aw Bu³at

T24gSmFuIDksIDIwMDggNDowMyBBTSwgTWFyYy1hbmRyZSBNYXJjIDxtYWNvdXJub3llckBnbWFp
bC5jb20+IHdyb3RlOgo+IFZlcnkgd2VpcmQuIEkndmUgdHJpZWQgcmFpc2luZyBhbiBlcnJvciBp
biBteSAuaXJicmMgZmlsZSB0byBzZWUgaWYgaXQncwo+IGxvYWRlZCBhbmQgaXQncyBub3QuCj4K
PiBBcmUgeW91IHVzaW5nIGJyZWFrcG9pbnRlciBvciBzb21ldGhpbmcgbGlrZSB0aGlzLiBTZWVt
cyBsaWtlIGl0IGNhbgo+IGNhdXNlIHRoaXMga2luZCBvZiBlcnJvcjogaHR0cDovL2Rldi5ydWJ5
b25yYWlscy5vcmcvdGlja2V0LzgwMwo+Cj4gV2hhdCB0aGUgY29udGVudCBvZiB5b3VyIC5pcmJy
YyBmaWxlID8KPgoKSSd2ZSBjaGVja2VkIGFuZCB3aXRoIHJhaWxzIHJ1bm5pbmcgb24gbW9uZ3Jl
bCB0aGVyZSBpcyB0aGUgc2FtZQpiZWhhdmlvdXIsIHNvIGl0IHNlZW1zIHRoYXQgaXNzdWUgaXMg
cmVsYXRlZCB0byByYWlscywgbm90IHRoaW4uIFJvUgppcyBzdHJhbmdlIHNvbWV0aW1lcy4uCgot
LSAKUmFkb3OzYXcgQnWzYXQKCmh0dHA6Ly9yYWRhcmVrLmpvZ2dlci5wbCAtIG3zaiBibG9nCg==
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top