Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news.

Ebb: C-Powered Web Server That Uses Rack – Faster than Mongrel *and* Thin

By Peter Cooper / March 4, 2008

ebb-concurrency.png

Ebb is a small, extremely high performance Web / HTTP server designed specifically for hosting applications built upon Web frameworks such as Rails and Merb (and, in future, apps on other non-Ruby frameworks.) The design is event based (similar to that used by Ruby daemons that use EventMachine) but Ebb itself is written in C and dispatches requests to Rack adapters. This is a real leapfrog over the popular Mongrel and Thin daemons which are primarily written in Ruby, and results in scary levels of performance.

Since the start of 2008, it seems as if the Ruby and Rails deployment sectors have been on fire! Thin, a Ruby HTTP daemon that's faster than Mongrel, made it on the scene in January, then we discussed the problems involved in deploying apps here on Ruby Inside, and my own SwitchPipe arrived in February. Other systems such as Swiftiply have also continued to innovate. These are exciting times!

Comments

  1. labria says:

    Ebb may be damn fast, but it's memory footprint is scary.

  2. ste says:

    Right after launching my application, the VSIZE skyrockets to 255M! (it's around 47M with Mongrel, and slightly less with Thin). Even the RSIZE is higher (35M vs. 32-33M).
    The performance (reqs/sec) seems to be somewhat better, though.

  3. Peter Cooper says:

    This strikes me as likely to be a bug, since I'd expect it to have a lower footprint due to the way it's constructed. There must be a rather nasty leak somewhere (or a development environment type setting / debugging information, etc.) Perhaps the attention Ebb gets today will encourage some fixes.

  4. Zdzichu says:

    What about -d (daemonize) option? Doesn't work for me (ebb doesn't answer at all).

  5. Forth says:

    what's interresting with Ebb is that it performs better when backend takes time to answer ( few seconds) than other evented servers (afaik) : http://four.livejournal.com/841030.html

  6. Robert Dempsey says:

    It is good to see more web server choices come out. As in free markets, competition is good, and in this case, we developers can benefit from better application performance. I hope the bar continues to be raised.

  7. Arie says:

    The high VSIZE is a bug in the 0.0.3 release. Daemonize works for me, but the ebb_rails command seems to ignore the 'env' setting, and always defaults to development.
    I manually editted the rails rack adapter to force it to production to run some tests. I didn't get anywhere the speedboost shown in the graph for real applications, more like 10%

  8. ry says:

    Forth, the concurrency code that you speak of has been reverted for the time being. creating the extra threads was quite costly. I would like handle this problem in the future, but for the time being this is not a feature of ebb.

    Labria, the large memory usage is from overzealous buffering on my part. this can be fixed by modifying the a few constants in the ebb.h header file and recompiling (as described here). I don't think it is from a memory leak.

  9. Arie says:

    *rails applications, not 'real applications'.

    It's not surprising the speedboost isn't that great for a rails application, considering the weight of a rails application.

  10. Dan says:

    @ry: have you tried running Valgrind with Ebb?

    The traditional setup with Rails apps is to have something like Mongrel behind a web server like Nginx or Apache. Is Ebb designed to run behind a server, or is it meant to run stand-alone? If stand-alone, then I'm curious to see how its static file serving performance compares to Nginx.

  11. Dan says:

    I guess I should RTFM next time :). Ebb is meant to be used behind a front-end server.

    Nginx would be the obvious choice for a front-end, but I've found that the Varnish Accelerator ( http://varnish.projects.linpro.no/ ) has even better performance when you take care of configuring your cache-related headers: Vary, Expires, Cache-Control, ETag and Last-Modified.

  12. Felipe Giotto says:

    It's good to have more web servers! But, as many users are saying, how "heavy" is ebb to a web server? What if I have 5+ applications running at the same time? I think I'd better analyse them for a little more time... Anyway, this is good news!!

    Best regards,

    Felipe Giotto.

  13. Peter Cooper says:

    It sounds like Ebb is, most likely, the "future" of this sort of stuff, but it's at least slightly amusing to me that SwitchPipe seems to be a lot easier and less burdensome at the present time. Of course, there ain't no 5000 requests per second, I'll assure you ;-)

  14. Hawkerb says:

    why perofrmance / memory size is not compared to fcgid ?

Other Posts to Enjoy

Twitter Mentions