Welcome to Amsterdam

Posted by Jim Jagielski on Thursday, February 22. 2007 in ASF

Sander and Nick somewhat recently blogged about how we're working on the "next generation" of the Apache web server, code named "amsterdam." My own personal codename for my design concept is "outback" and we'll see why in a bit. To be sure, we are at the very early stages, basically conceptual whiteboarding, if even there, right now. But some things are clear, at least in what major direction Apache will be taking. With 1.2 the big news was HTTP/1.1 compliance; with 1.3 it was Windows compatibility; with 2.0 it was threading; with 2.2 it's proxy, cache and large file improvements. With next-gen, it will be asynchronous, event-based processing... The real advantage of this can best be made clear using an analogy. I like to think of the way Apache works as similar to checking out at a grocery store. As people check out (requests come in), the are handled by a "dedicated" cashier (process or thread). The cashier is busy with that single person, and if more people need to check out, they need to be handled by other cashiers (the store manager, who then calls in extra cashiers, is the Apache parent process). As we all know, the problem occurs when there are more people checking out at the same time, and there aren't enough cashiers around; they queue up or are simply denied. To handle this, the move is more towards a restaurant and waiter-type design format. In this scenario, your "server" doesn't just sit there at your table, dedicated just to you. Instead, they move about, responsible for several diners, taking drink orders here, dessert orders there, delivering food hither and yon. This is much more efficient. Of course, there is a step even further, which some of you may have already guessed upon. There are, after all, times when your waiter is handling a lot of tables, and other waiters are handling almost none; your waiter may not be dedicated to you, but they are dedicated to their "section." The improvement is the way Outback Steakhouse tries to operate, where all waiters kind of do everything, and sometimes a different waiter will take your dinner order as compared to the one who took your drinks, etc. This is the most efficient, but also the trickiest one to pull off in a hybrid (process and thread based) server (the waiter "sections" could be considered process bound, in a way). It's also the source of my design codename: outback. This will be fun, but hard, especially when we want to maintain as much backwards compatibility as possible, as well as allowing the server to be useful on OS's that may lack the network calls (like epoll and kqueue) that make it "straightforward." Add in the current filter design and you can start seeing a lot of work needs to be done. But with serf, we may already have a good foundation to start off with.

The author does not allow comments to this entry

Quicksearch

Search for an entry in IMO:

Did not find what you were looking for? Post a comment for an entry or contact us via email!