[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

[ANN] Mongrel 0.1.0 -- A Fast As Hell Mostly Ruby Web Server

Zed A. Shaw

1/20/2006 6:46:00 AM

Hi,

This is an announce for Mongrel, a mostly Ruby webserver. I just
started it as I was trying to work on solutions for people deploying
Ruby web applications, and already it's pretty damn fast. We're
talking really really damn fast. I mean like people won't believe me
that it's this fast and I don't really believe it.


INSTALL

First off, you can grab it at http://www.ze......
mongrel-0.1.0.tar.bz2 to play with it.

*** You'll need Ruby 1.8.4, but it's tested on Mac OSX and Linux at
least. ***

When you get it do:

rake
ruby -Ilib examples/simpletest.rb

Go to http://localhost:3000/test to play with it. Other URIs give
you a lame "not found".


HOW?

Feel free to look at the source in lib/mongrel.rb and if you want to
go insane you can try to grok the HTTP parser in ext/http11/*.c (not
that bad really).


CAN IT BAKE CHEDDAR?

So far it's very light and isn't nearly capable enough, so I'm
looking for things people want in a *simple* web app server for
running their Ruby web applications in. Keep in mind that I'm not
going to be Ruby on Rails specific. I love all you weirdos.

Now for the fun (and surely flamewar generating) statistics on how it
compares to WEBrick:

WEBrick/Linux: 175 req/sec
Mongrel/Linux: 1350 req/sec

WEBrick/OSX: 5.3 req/sec
Mongrel/OSX: 304.4 req/sec

-- Both tests were a simple handler that sent back "hello!" when /
test was accessed. WEBrick's logging was redirected to /dev/null
since I can't figure out how to turn it the hell off.

The OSX results are pathetic and I suspect there's something
seriously wrong with my setup since OSX does considerably worse than
the comparable Linux machine. But, the important thing is that
Mongrel seems to be doing way better than WEBrick. I'm hoping to
keep the high performance, but don't trust my word for it, go grab
the source and grab httperf to see if you get similar performance on
your machines. Hell, it might even work on Win32.


DOWNSIDES

It uses some Ruby 1.8.4 stuff and it uses a C extension for the HTTP
parsing. The C is all ANSI so you should be OK, but let me know if
it don't compile somewhere. It's also nowhere near complete, mostly
just enough code to prove the concept.


FEEDBACK

Since I just started this, and I'm getting such great performance out
of it already, I'm looking to get it working with Rails this weekend
(along with SCGI fixes to keep people happy), then maybe Og+Nitro.
I'd love for people to send me their wish list and opinions on this.
I'm mostly motivated to write this as the answer to Java's Tomcat.
What are your thoughts? Too ambitious? Not enough?

I'm especially interested if you can improve the performance or
disprove that it's actually that fast. I still don't quite believe
it myself.

Thanks for the time, and enjoy.

Zed A. Shaw
http://www.ze...


16 Answers

Ezra Zygmuntowicz

1/20/2006 7:10:00 AM

0


On Jan 19, 2006, at 10:45 PM, Zed Shaw wrote:

> Hi,
>
> This is an announce for Mongrel, a mostly Ruby webserver. I just
> started it as I was trying to work on solutions for people
> deploying Ruby web applications, and already it's pretty damn
> fast. We're talking really really damn fast. I mean like people
> won't believe me that it's this fast and I don't really believe it.
>
>
> Thanks for the time, and enjoy.
>
> Zed A. Shaw
> http://www.ze...
>


Zed-

This looks like fun. I tried to install it but got errors. Can you
see whats wrong here when I run rake?

root@grunt:~/mongrel-0.1.0# rake
(in /home/ez/mongrel-0.1.0)
make
make: Nothing to be done for `all'.
cp ext/http11/http11.so lib
/usr/local/bin/ruby -Ilib:test "/usr/local/lib/ruby/gems/1.8/gems/
rake-0.7.0/lib/rake/rake_test_loader.rb" "test/test_http11.rb" "test/
test_trie.rb" "test/test_ws.rb"
/lib/mongrel.rb:54: warning: already initialized constant
ERROR_404_RESPONSE
/lib/mongrel.rb:56: warning: already initialized constant CHUNK_SIZE
Loaded suite /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake/
rake_test_loader
Started
Error result after 6 bytes of 15
Read 18 string was 18
...Running server
Hitting server
/usr/local/lib/ruby/1.8/timeout.rb:54:in `open': execution expired
(Timeout::Error)
from /usr/local/lib/ruby/1.8/net/http.rb:562:in `connect'
from /usr/local/lib/ruby/1.8/timeout.rb:48:in `timeout'
from /usr/local/lib/ruby/1.8/timeout.rb:76:in `timeout'
from /usr/local/lib/ruby/1.8/net/http.rb:562:in `connect'
from /usr/local/lib/ruby/1.8/net/http.rb:555:in `do_start'
from /usr/local/lib/ruby/1.8/net/http.rb:544:in `start'
from /usr/local/lib/ruby/1.8/net/http.rb:404:in `post_form'
from ./test/test_ws.rb:20:in `test_simple_server'
... 11 levels...
from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:200:in
`run'
from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:13:in
`run'
from /usr/local/lib/ruby/1.8/test/unit.rb:285
from /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake/
rake_test_loader.rb:5

I'm looking forward to playing with this.

Thanks-
-Ezra Zygmuntowicz
WebMaster
Yakima Herald-Republic Newspaper
http://yakima...
ezra@yakima-herald.com
blog: http://b...




james_b

1/20/2006 7:16:00 AM

0

Zed Shaw wrote:
> Hi,
>
> This is an announce for Mongrel, a mostly Ruby webserver. I just
> started it as I was trying to work on solutions for people deploying
> Ruby web applications, and already it's pretty damn fast. We're
> talking really really damn fast. I mean like people won't believe me
> that it's this fast and I don't really believe it.

Really? I don't believe you.

>
>
> INSTALL
>
> First off, you can grab it at http://www.zedshaw.com/...
> mongrel-0.1.0.tar.bz2 to play with it.
>
> *** You'll need Ruby 1.8.4, but it's tested on Mac OSX and Linux at
> least. ***

Ah. The Windows Challenge.


...

>
>
> CAN IT BAKE CHEDDAR?
>
> So far it's very light and isn't nearly capable enough, so I'm looking
> for things people want in a *simple* web app server for running their
> Ruby web applications in. Keep in mind that I'm not going to be Ruby
> on Rails specific. I love all you weirdos.
>

I've hacked around with WEBrick for various lightweight Web
services-like things (along the lines of Catapult). Of particular
interest are things that sit and spin and spit back data on request.
Not much heavy logic or calculation, but reaching into Madeleine or
SQLite or something, where having a simple, pure-Ruby data-managing
process allows for plain CGI or command-line apps to offload work.

For example, sticking ri/rdoc data into some persistent in-memory
process to speed up search and display.



James

--

http://www.ru... - Ruby Help & Documentation
http://www.artima.c... - The Journal By & For Rubyists
http://www.rub... - The Ruby Store for Ruby Stuff
http://www.jame... - Playing with Better Toys
http://www.30seco... - Building Better Tools


Karl-Heinz Wild

1/20/2006 9:19:00 AM

0

In message "[ANN] Mongrel 0.1.0 -- A Fast As Hell Mostly Ruby Web Server"
on 20.01.2006, Zed Shaw <zedshaw@zedshaw.com> writes:

ZS> This is an announce for Mongrel, a mostly Ruby webserver. I just
ZS> started it as I was trying to work on solutions for people deploying
ZS> Ruby web applications, and already it's pretty damn fast. We're
ZS> talking really really damn fast. I mean like people won't believe me
ZS> that it's this fast and I don't really believe it.

ZS> When you get it do:

ZS> rake
ZS> ruby -Ilib examples/simpletest.rb

ZS> Go to http://localhost:3000/test to play with it. Other URIs give
ZS> you a lame "not found".

works without any problem on freebsd 5.4

great!

karl-heinz



Jaroslaw Zabiello

1/20/2006 10:06:00 AM

0

On Fri, 20 Jan 2006 15:45:37 +0900, Zed Shaw wrote:

> First off, you can grab it at http://www.zedshaw.com/...

Does not work for Firefox 1.0.7, nor Opera 8.51, nor IE6.0 (windows server
2003).

--
JZ

Sascha Ebach

1/20/2006 11:11:00 AM

0

Hi Zed,

this is awesome. I seem to have the same problem under Cygwin as Ezra. Here
is my output:

$ rake
(in /cygdrive/h/lib/Ruby/serving/mongrel-0.1.0)
/usr/bin/ruby extconf.rb
checking for main() in -lc... yes
creating Makefile
make
gcc -g -O2 -I. -I/usr/lib/ruby/1.8/i386-cygwin
-I/usr/lib/ruby/1.8/i386-cygwin -I. -c http11.c
gcc -g -O2 -I. -I/usr/lib/ruby/1.8/i386-cygwin
-I/usr/lib/ruby/1.8/i386-cygwin -I. -c http11_parser.c
gcc -shared -s -Wl,--enable-auto-import,--export-all -L"/usr/lib" -o
http11.so http11.o http11_parser.o -lruby -lc -lcrypt
cp ext/http11/http11.so lib
/usr/bin/ruby -Ilib:test
"/usr/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/rake_test_loader.rb"
"test/test_http11.rb" "test/test_trie.rb" "te
st/test_ws.rb"
/lib/mongrel.rb:54: warning: already initialized constant ERROR_404_RESPONSE
/lib/mongrel.rb:56: warning: already initialized constant CHUNK_SIZE
Loaded suite /usr/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/rake_test_loader
Started
Error result after 6 bytes of 15
Read 18 string was 18
...Running server
Hitting server
E
Finished in 3.207 seconds.

1) Error:
test_simple_server(WSTest):
Errno::ECONNRESET: Connection reset by peer
/usr/lib/ruby/1.8/net/protocol.rb:133:in `sysread'
/usr/lib/ruby/1.8/net/protocol.rb:133:in `rbuf_fill'
/usr/lib/ruby/1.8/timeout.rb:45:in `timeout'
/usr/lib/ruby/1.8/timeout.rb:62:in `timeout'
/usr/lib/ruby/1.8/net/protocol.rb:132:in `rbuf_fill'
/usr/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'
/usr/lib/ruby/1.8/net/protocol.rb:126:in `readline'
/usr/lib/ruby/1.8/net/http.rb:1988:in `read_status_line'
/usr/lib/ruby/1.8/net/http.rb:1977:in `read_new'
/usr/lib/ruby/1.8/net/http.rb:1046:in `request'
/usr/lib/ruby/1.8/net/http.rb:405:in `post_form'
/usr/lib/ruby/1.8/net/http.rb:545:in `start'
/usr/lib/ruby/1.8/net/http.rb:404:in `post_form'
./test/test_ws.rb:20:in `test_simple_server'
/usr/lib/ruby/1.8/timeout.rb:45:in `timeout'
./test/test_ws.rb:11:in `test_simple_server'

5 tests, 8 assertions, 0 failures, 1 errors
rake aborted!
Command failed with status (1): [/usr/bin/ruby -Ilib:test "/usr/lib/ruby/ge...]

-Sascha

> This looks like fun. I tried to install it but got errors. Can you
> see whats wrong here when I run rake?
>
> root@grunt:~/mongrel-0.1.0# rake
> (in /home/ez/mongrel-0.1.0)
> make
> make: Nothing to be done for `all'.
> cp ext/http11/http11.so lib
> /usr/local/bin/ruby -Ilib:test
> "/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake/rake_test_loader.rb"
> "test/test_http11.rb" "test/test_trie.rb" "test/test_ws.rb"
> ./lib/mongrel.rb:54: warning: already initialized constant
> ERROR_404_RESPONSE
> ./lib/mongrel.rb:56: warning: already initialized constant CHUNK_SIZE
> Loaded suite
> /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake/rake_test_loader
> Started
> Error result after 6 bytes of 15
> .Read 18 string was 18
> ...Running server
> Hitting server
> /usr/local/lib/ruby/1.8/timeout.rb:54:in `open': execution expired
> (Timeout::Error)
> from /usr/local/lib/ruby/1.8/net/http.rb:562:in `connect'
> from /usr/local/lib/ruby/1.8/timeout.rb:48:in `timeout'
> from /usr/local/lib/ruby/1.8/timeout.rb:76:in `timeout'
> from /usr/local/lib/ruby/1.8/net/http.rb:562:in `connect'
> from /usr/local/lib/ruby/1.8/net/http.rb:555:in `do_start'
> from /usr/local/lib/ruby/1.8/net/http.rb:544:in `start'
> from /usr/local/lib/ruby/1.8/net/http.rb:404:in `post_form'
> from ./test/test_ws.rb:20:in `test_simple_server'
> ... 11 levels...
> from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:200:in `run'
> from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:13:in `run'
> from /usr/local/lib/ruby/1.8/test/unit.rb:285
> from
> /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake/rake_test_loader.rb:5
>
> I'm looking forward to playing with this.
>
> Thanks-
> -Ezra Zygmuntowicz
> WebMaster
> Yakima Herald-Republic Newspaper
> http://yakima...
> ezra@yakima-herald.com
> blog: http://b...
>
>
>
>



Zed A. Shaw

1/20/2006 11:21:00 AM

0

The already initialized constants are just from how the tests are
loaded (I think). Those constants will go away anyhow so safe to
ignore.

The timeout explosion though is interesting. If you look in test/
test_ws.rb you can see I put a 15 second timeout around a simple test
of the web server. If you're getting this then loading and hitting
the webserver is taking longer than 15 seconds. Either it really
doesn't work on your system, or your system is too slow. Can you try
putting a longer timeout just for test? Also, what are you running?

Otherwise, does the examples/simpletest.rb work at least? This test
failure may just be a false positive.

Zed A. Shaw
http://www.ze...


On Jan 20, 2006, at 2:09 AM, Ezra Zygmuntowicz wrote:

>
> On Jan 19, 2006, at 10:45 PM, Zed Shaw wrote:
>
>> Hi,
>>
>> This is an announce for Mongrel, a mostly Ruby webserver. I just
>> started it as I was trying to work on solutions for people
>> deploying Ruby web applications, and already it's pretty damn
>> fast. We're talking really really damn fast. I mean like
>> people won't believe me that it's this fast and I don't really
>> believe it.
>>
>>
>> Thanks for the time, and enjoy.
>>
>> Zed A. Shaw
>> http://www.ze...
>>
>
>
> Zed-
>
> This looks like fun. I tried to install it but got errors. Can you
> see whats wrong here when I run rake?
>
> root@grunt:~/mongrel-0.1.0# rake
> (in /home/ez/mongrel-0.1.0)
> make
> make: Nothing to be done for `all'.
> cp ext/http11/http11.so lib
> /usr/local/bin/ruby -Ilib:test "/usr/local/lib/ruby/gems/1.8/gems/
> rake-0.7.0/lib/rake/rake_test_loader.rb" "test/test_http11.rb"
> "test/test_trie.rb" "test/test_ws.rb"
> ./lib/mongrel.rb:54: warning: already initialized constant
> ERROR_404_RESPONSE
> ./lib/mongrel.rb:56: warning: already initialized constant CHUNK_SIZE
> Loaded suite /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake/
> rake_test_loader
> Started
> Error result after 6 bytes of 15
> .Read 18 string was 18
> ...Running server
> Hitting server
> /usr/local/lib/ruby/1.8/timeout.rb:54:in `open': execution expired
> (Timeout::Error)
> from /usr/local/lib/ruby/1.8/net/http.rb:562:in `connect'
> from /usr/local/lib/ruby/1.8/timeout.rb:48:in `timeout'
> from /usr/local/lib/ruby/1.8/timeout.rb:76:in `timeout'
> from /usr/local/lib/ruby/1.8/net/http.rb:562:in `connect'
> from /usr/local/lib/ruby/1.8/net/http.rb:555:in `do_start'
> from /usr/local/lib/ruby/1.8/net/http.rb:544:in `start'
> from /usr/local/lib/ruby/1.8/net/http.rb:404:in `post_form'
> from ./test/test_ws.rb:20:in `test_simple_server'
> ... 11 levels...
> from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:200:in
> `run'
> from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:13:in
> `run'
> from /usr/local/lib/ruby/1.8/test/unit.rb:285
> from /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake/
> rake_test_loader.rb:5
>
> I'm looking forward to playing with this.
>
> Thanks-
> -Ezra Zygmuntowicz
> WebMaster
> Yakima Herald-Republic Newspaper
> http://yakima...
> ezra@yakima-herald.com
> blog: http://b...
>
>
>


Zed A. Shaw

1/20/2006 11:24:00 AM

0

Thanks Sascha. I actually haven't tried under cygwin. The problem
may just be that 15 seconds isn't long enough to start the server and
use net/http to grab it as a test. Try changing the Timeout.timeout
(15) to 30. It really shouldn't take longer than that. Otherwise I
must debug it.

Otherwise, it seems to at least be *sort of* working in cygwin.
That's really cool. Does the examples/simpletest.rb work at all?

Zed A. Shaw
http://www.ze...


On Jan 20, 2006, at 6:11 AM, Sascha Ebach wrote:

> Hi Zed,
>
> this is awesome. I seem to have the same problem under Cygwin as
> Ezra. Here is my output:
>
> $ rake
> (in /cygdrive/h/lib/Ruby/serving/mongrel-0.1.0)
> /usr/bin/ruby extconf.rb
> checking for main() in -lc... yes
> creating Makefile
> make
> gcc -g -O2 -I. -I/usr/lib/ruby/1.8/i386-cygwin -I/usr/lib/ruby/
> 1.8/i386-cygwin -I. -c http11.c
> gcc -g -O2 -I. -I/usr/lib/ruby/1.8/i386-cygwin -I/usr/lib/ruby/
> 1.8/i386-cygwin -I. -c http11_parser.c
> gcc -shared -s -Wl,--enable-auto-import,--export-all -L"/usr/lib" -
> o http11.so http11.o http11_parser.o -lruby -lc -lcrypt
> cp ext/http11/http11.so lib
> /usr/bin/ruby -Ilib:test "/usr/lib/ruby/gems/1.8/gems/rake-0.6.2/
> lib/rake/rake_test_loader.rb" "test/test_http11.rb" "test/
> test_trie.rb" "te
> st/test_ws.rb"
> ./lib/mongrel.rb:54: warning: already initialized constant
> ERROR_404_RESPONSE
> ./lib/mongrel.rb:56: warning: already initialized constant CHUNK_SIZE
> Loaded suite /usr/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/
> rake_test_loader
> Started
> Error result after 6 bytes of 15
> .Read 18 string was 18
> ...Running server
> Hitting server
> E
> Finished in 3.207 seconds.
>
> 1) Error:
> test_simple_server(WSTest):
> Errno::ECONNRESET: Connection reset by peer
> /usr/lib/ruby/1.8/net/protocol.rb:133:in `sysread'
> /usr/lib/ruby/1.8/net/protocol.rb:133:in `rbuf_fill'
> /usr/lib/ruby/1.8/timeout.rb:45:in `timeout'
> /usr/lib/ruby/1.8/timeout.rb:62:in `timeout'
> /usr/lib/ruby/1.8/net/protocol.rb:132:in `rbuf_fill'
> /usr/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'
> /usr/lib/ruby/1.8/net/protocol.rb:126:in `readline'
> /usr/lib/ruby/1.8/net/http.rb:1988:in `read_status_line'
> /usr/lib/ruby/1.8/net/http.rb:1977:in `read_new'
> /usr/lib/ruby/1.8/net/http.rb:1046:in `request'
> /usr/lib/ruby/1.8/net/http.rb:405:in `post_form'
> /usr/lib/ruby/1.8/net/http.rb:545:in `start'
> /usr/lib/ruby/1.8/net/http.rb:404:in `post_form'
> ./test/test_ws.rb:20:in `test_simple_server'
> /usr/lib/ruby/1.8/timeout.rb:45:in `timeout'
> ./test/test_ws.rb:11:in `test_simple_server'
>
> 5 tests, 8 assertions, 0 failures, 1 errors
> rake aborted!
> Command failed with status (1): [/usr/bin/ruby -Ilib:test "/usr/lib/
> ruby/ge...]
>
> -Sascha
>
>> This looks like fun. I tried to install it but got errors. Can
>> you see whats wrong here when I run rake?
>> root@grunt:~/mongrel-0.1.0# rake
>> (in /home/ez/mongrel-0.1.0)
>> make
>> make: Nothing to be done for `all'.
>> cp ext/http11/http11.so lib
>> /usr/local/bin/ruby -Ilib:test "/usr/local/lib/ruby/gems/1.8/gems/
>> rake-0.7.0/lib/rake/rake_test_loader.rb" "test/test_http11.rb"
>> "test/test_trie.rb" "test/test_ws.rb"
>> ./lib/mongrel.rb:54: warning: already initialized constant
>> ERROR_404_RESPONSE
>> ./lib/mongrel.rb:56: warning: already initialized constant CHUNK_SIZE
>> Loaded suite /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake/
>> rake_test_loader
>> Started
>> Error result after 6 bytes of 15
>> .Read 18 string was 18
>> ...Running server
>> Hitting server
>> /usr/local/lib/ruby/1.8/timeout.rb:54:in `open': execution expired
>> (Timeout::Error)
>> from /usr/local/lib/ruby/1.8/net/http.rb:562:in `connect'
>> from /usr/local/lib/ruby/1.8/timeout.rb:48:in `timeout'
>> from /usr/local/lib/ruby/1.8/timeout.rb:76:in `timeout'
>> from /usr/local/lib/ruby/1.8/net/http.rb:562:in `connect'
>> from /usr/local/lib/ruby/1.8/net/http.rb:555:in `do_start'
>> from /usr/local/lib/ruby/1.8/net/http.rb:544:in `start'
>> from /usr/local/lib/ruby/1.8/net/http.rb:404:in `post_form'
>> from ./test/test_ws.rb:20:in `test_simple_server'
>> ... 11 levels...
>> from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:
>> 200:in `run'
>> from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:13:in
>> `run'
>> from /usr/local/lib/ruby/1.8/test/unit.rb:285
>> from /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake/
>> rake_test_loader.rb:5
>> I'm looking forward to playing with this.
>> Thanks-
>> -Ezra Zygmuntowicz
>> WebMaster
>> Yakima Herald-Republic Newspaper
>> http://yakima...
>> ezra@yakima-herald.com
>> blog: http://b...
>
>


Zed A. Shaw

1/20/2006 12:21:00 PM

0

Ah, figured it out. I'm basically retarded and included two past
version of the same source in different files. I was sabotaged by
rsync I tell ya!

Anyway, I'll post another announce with all the fixes.

Zed


On Jan 20, 2006, at 6:11 AM, Sascha Ebach wrote:

> Hi Zed,
>
> this is awesome. I seem to have the same problem under Cygwin as
> Ezra. Here is my output:


George Moschovitis

1/20/2006 2:32:00 PM

0

Looks interesting ;-D Thanks!

-g.

On 1/20/06, Zed Shaw <zedshaw@zedshaw.com> wrote:
> Hi,
>
> This is an announce for Mongrel, a mostly Ruby webserver. I just
> started it as I was trying to work on solutions for people deploying
> Ruby web applications, and already it's pretty damn fast. We're
> talking really really damn fast. I mean like people won't believe me
> that it's this fast and I don't really believe it.
>
>
> INSTALL
>
> First off, you can grab it at http://www.ze......
> mongrel-0.1.0.tar.bz2 to play with it.
>
> *** You'll need Ruby 1.8.4, but it's tested on Mac OSX and Linux at
> least. ***
>
> When you get it do:
>
> rake
> ruby -Ilib examples/simpletest.rb
>
> Go to http://localhost:3000/test to play with it. Other URIs give
> you a lame "not found".
>
>
> HOW?
>
> Feel free to look at the source in lib/mongrel.rb and if you want to
> go insane you can try to grok the HTTP parser in ext/http11/*.c (not
> that bad really).
>
>
> CAN IT BAKE CHEDDAR?
>
> So far it's very light and isn't nearly capable enough, so I'm
> looking for things people want in a *simple* web app server for
> running their Ruby web applications in. Keep in mind that I'm not
> going to be Ruby on Rails specific. I love all you weirdos.
>
> Now for the fun (and surely flamewar generating) statistics on how it
> compares to WEBrick:
>
> WEBrick/Linux: 175 req/sec
> Mongrel/Linux: 1350 req/sec
>
> WEBrick/OSX: 5.3 req/sec
> Mongrel/OSX: 304.4 req/sec
>
> -- Both tests were a simple handler that sent back "hello!" when /
> test was accessed. WEBrick's logging was redirected to /dev/null
> since I can't figure out how to turn it the hell off.
>
> The OSX results are pathetic and I suspect there's something
> seriously wrong with my setup since OSX does considerably worse than
> the comparable Linux machine. But, the important thing is that
> Mongrel seems to be doing way better than WEBrick. I'm hoping to
> keep the high performance, but don't trust my word for it, go grab
> the source and grab httperf to see if you get similar performance on
> your machines. Hell, it might even work on Win32.
>
>
> DOWNSIDES
>
> It uses some Ruby 1.8.4 stuff and it uses a C extension for the HTTP
> parsing. The C is all ANSI so you should be OK, but let me know if
> it don't compile somewhere. It's also nowhere near complete, mostly
> just enough code to prove the concept.
>
>
> FEEDBACK
>
> Since I just started this, and I'm getting such great performance out
> of it already, I'm looking to get it working with Rails this weekend
> (along with SCGI fixes to keep people happy), then maybe Og+Nitro.
> I'd love for people to send me their wish list and opinions on this.
> I'm mostly motivated to write this as the answer to Java's Tomcat.
> What are your thoughts? Too ambitious? Not enough?
>
> I'm especially interested if you can improve the performance or
> disprove that it's actually that fast. I still don't quite believe
> it myself.
>
> Thanks for the time, and enjoy.
>
> Zed A. Shaw
> http://www.ze...
>
>


--
http://www...
http://ww...
http://www.n...


khaines

1/20/2006 5:08:00 PM

0

On Thursday 19 January 2006 11:45 pm, Zed Shaw wrote:
> Hi,
>
> This is an announce for Mongrel, a mostly Ruby webserver. I just
> started it as I was trying to work on solutions for people deploying
> Ruby web applications, and already it's pretty damn fast. We're
> talking really really damn fast. I mean like people won't believe me
> that it's this fast and I don't really believe it.

Ooooh. Nice. I use the _heck_ out of webrick when developing IOWA apps. I
will definitely have to see how well this can work for the same sort of
thing, because webrick is going to be hard to beat. It's just so easy to use
and just works. I can take an entire production app or website, and usually
with no changes, run it all under webrick quite adequately.

It'd be great if I could do the same thing, with the same ease of use, with
better performance. One thing some customers like to do is to take their
production sites/apps and put them onto a laptop or a CD/DVD that they then
take to tradeshows. The better the performance of the app, the better they
look to their potential customers.

Thanks,

Kirk Haines