From: Zed Shaw Date: 2006-01-23T10:49:38+09:00 Subject: Re: Mongrel 0.1.1 -- A Fast Ruby Web Server (It Works Now, M On Jan 22, 2006, at 4:07 PM, Amr Malik wrote: > > Thanks for your work on this. Can you elaborate on what makes > Mongrel so > much faster than Webrick? What kind of optimization techniques did you > use to make this faster. Are you using C extensions etc in part to > speed > things up. (I guess I'm looking for a bit of a architectural overview > with a webrick arch. comparison to boot if you used that as > inspiration) > You're going to laugh but right now it's down to a bit of Ruby and a nifty C extension. Seriously. No need yet of much more than some threads that crank on output, a parser (in C) that makes a hash, and a way to quickly lookup URI mappings. The rest is done with handlers that process the result of this. It may get a bit larger than this, but this core will probably be more than enough to at least service basic requests. I'm currently testing out a way to drop the threads in favor of IO.select, but it looks like that messes with threads in some weird ways. Once I figure out all the nooks and crannies of the thing then I'll do a more formal design, but even then it's going to be ruthlessly simplistic. Zed A. Shaw http://www.zedshaw.com/