Thin 2.0 pre-release

735 views
Skip to first unread message

Marc-André Cournoyer

unread,
Sep 22, 2012, 4:17:30 PM9/22/12
to thin...@googlegroups.com
Hey everyone,

I've been working on version 2.0 of Thin on and off for quite some time now. It's a complete rewrite with better performance, more portable (based on the cross-platform http-parser.rb), more HTTP compliant and more features. And I believe it's ready for testing. But perhaps not ready for production use yet.

== What's new in 2.0?

- Prefork model with an EventMachine loop running in each worker. (Imagine Thin and Unicorn having a child.)
- Optional single process mode for non-UNIX systems and simpler deployments. (In case your OS doesn't support fork)
- Optional threaded mode using a pool of threads. (If your app code is slow)
- Easy asynchronous streaming response support with chunked encoding. (Easier API to use and also now fully HTTP compliant w/ chunked encoding)
- Fast file serving with automatic streaming for large files. (You know on Heroku Cedar stack your files are served by the Ruby server right? Well now it will be fast and use less memory)

== Trying it now!

gem install thin --pre


Let me know if you encounter any bug or weird behaviour.

Hope you like it :)

--
M-A

Dave Kapp

unread,
Oct 2, 2012, 11:53:37 AM10/2/12
to thin...@googlegroups.com
I don't know if I'll get a chance to try it anytime in the near future or not, but the features you list there sound awesome! Congrats on moving forward with the new release and I look forward to using it when I can :)


Dave Kapp

Sagar Ranglani

unread,
Oct 11, 2012, 2:18:02 AM10/11/12
to thin...@googlegroups.com
Is it possible to stream using thin 2.0.0.pre?
Please answer here
https://groups.google.com/d/topic/thin-ruby/8iZGaoFDIA0/discussion

Adrian Marius Popa

unread,
Oct 31, 2012, 10:45:21 AM10/31/12
to thin...@googlegroups.com
Another feature is EventMachine-LE http://ibc.github.com/EventMachine-LE/

I saw it mentioned at the end of this article 

Marc-André Cournoyer

unread,
Oct 31, 2012, 3:44:09 PM10/31/12
to thin...@googlegroups.com
I wouldn't call it a feature... Hopefully the patch required by Thin will be included in EventMachine and we can rely on it instead of a fork.


--
You received this message because you are subscribed to the Google Groups "thin-ruby" group.
To view this discussion on the web visit https://groups.google.com/d/msg/thin-ruby/-/T12rx46oLD0J.

To post to this group, send email to thin...@googlegroups.com.
To unsubscribe from this group, send email to thin-ruby+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/thin-ruby?hl=en.



--
M-A

Jonathan Rochkind

unread,
Nov 4, 2012, 3:29:58 PM11/4/12
to thin...@googlegroups.com
> - Optional threaded mode using a pool of threads. (If your app code is slow)

I'm actually particularly excited about that feature, I hope it makes it in and becomes a mature and robust feature. 

Single-process multi-threaded request handling can actually result in a lot of capacity not only if your app code is slow -- but if your app is I/O bound, as many apps are -- if your app is I/O bound, then even on MRI with the GIL.   And could be a cheaper option to handle more traffic on platforms that charge per-process (heroku, more or less), compared to multi-process scale-out. 

Rails 4.0 is slated to have `config.threadsafe!` on by default at least in production (http://tenderlovemaking.com/2012/06/18/removing-config-threadsafe.html).  But it wont' matter if hardly anyone is using an app server that can do MT concurrent request dispatching.  thin being able to do so could really open that up to 'the masses'.  (right now upcoming Passenger Enterprise will do it, but not free passenger. puma will do it. Not sure about others).   And the more you can open up concurrent request handling in Rails and the more people using it, the more likely the remaining bugs and mis-designs in rails around multi-threaded concurrency will be noted and fixed. 
 

Marc-André Cournoyer

unread,
Nov 4, 2012, 3:41:35 PM11/4/12
to thin...@googlegroups.com
Hey thx Jonathan,

Glad you're excited about that feature.

It has been available for a few years in Thin 1.x as an experimental feature, see the --threaded option. But now it will be official!


--
You received this message because you are subscribed to the Google Groups "thin-ruby" group.
To view this discussion on the web visit https://groups.google.com/d/msg/thin-ruby/-/UtgmNeLKOf8J.

To post to this group, send email to thin...@googlegroups.com.
To unsubscribe from this group, send email to thin-ruby+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/thin-ruby?hl=en.

Jonathan Rochkind

unread,
Nov 4, 2012, 4:12:42 PM11/4/12
to thin...@googlegroups.com
Yeah, when I looked into thin 1.0 with --threaded, word on 'the street' (the blogosphere etc) was that this feature in thin was not very robust or well-supported, people have had problems with it. Perhaps that was a misperception and I should have been using it all along?  Or perhaps you've improved it for 2.0, or perhaps there are problems you didn't know about in it, but if so hopefully making it more official and documented will result in remaining problems being discovered and fixed!

With passenger enterprise (but not free) supporting MT concurrent request dispatching, it will be GREAT to have thin, which is probably the next most popular deploy option, supporting it officially too as a free alternative. 

From: thin...@googlegroups.com [thin...@googlegroups.com] on behalf of Marc-André Cournoyer [macou...@gmail.com]
Sent: Sunday, November 04, 2012 3:41 PM
To: thin...@googlegroups.com
Subject: Re: Thin 2.0 pre-release

Steve Cosman

unread,
Jul 13, 2013, 9:57:18 AM7/13/13
to thin...@googlegroups.com

v2 Sounds awesome. Especially if the preforking works with Ruby 2.0's copy-on-write.

Any update on the stability of the V2 branch or timing for a release?

Thanks!
Reply all
Reply to author
Forward
0 new messages