Re:Snap: A Haskell Web Framework
by davidmathers on Saturday May 22, 2010 @09:39PM
(#1371511)
Good point. I also noticed they're running snap with 4 threads. Since rails is multi-process rather than multi-thread they would actually need to set up something like passenger as acangiano suggested.
Better would be to just limit the test to single-process/single-thread. The idea should be to compare web frameworks not web servers.
Re:Snap: A Haskell Web Framework
by mightybyte on Sunday May 23, 2010 @12:51AM
(#1371823)
Yes, but it's also useful to compare similar levels of effort. Using 4 threads with Snap is a similar level of effort to using thin. Setting up 4 separate processes with passenger requires quite a bit more effort, especially if you haven't done it before.
Re:Snap: A Haskell Web Framework
by davidmathers on Sunday May 23, 2010 @05:46AM
(#1372076)
You can set up 4 processes with thin, just do:
> thin -e production -s 4 start
The problem is that each process listens on its own port. They can't all listen on port 3000, so you need some sort of proxy to parcel out the requests.
Re:Snap: A Haskell Web Framework
by mightybyte on Sunday May 23, 2010 @12:43AM
(#1371811)
I did use -e production, just didn't remember to mention it in the post above. I'll try thin though.
script/server -e production
Running in development mode severely hampers Rails' performance.