21 messages in org.apache.httpd.devRe: Is async the answer
FromSent OnAttachments
Akins, Brian18 Jan 2008 10:52 
Justin Erenkrantz18 Jan 2008 11:16 
Colm MacCarthaigh18 Jan 2008 11:20 
Akins, Brian18 Jan 2008 11:27 
Akins, Brian18 Jan 2008 11:31 
Colm MacCarthaigh18 Jan 2008 12:07 
Akins, Brian18 Jan 2008 13:17 
Colm MacCarthaigh18 Jan 2008 13:29 
Ruediger Pluem18 Jan 2008 14:30 
Justin Erenkrantz18 Jan 2008 16:33 
Niklas Edmundsson19 Jan 2008 03:53 
Graham Leggett19 Jan 2008 04:45 
Davi Arnaut19 Jan 2008 06:57 
Jim Jagielski19 Jan 2008 07:04 
Graham Leggett19 Jan 2008 08:02 
Henrik Nordström19 Jan 2008 13:14 
Henrik Nordström19 Jan 2008 13:19 
Davi Arnaut19 Jan 2008 15:29 
Graham Leggett20 Jan 2008 07:44 
Akins, Brian22 Jan 2008 10:03 
Akins, Brian22 Jan 2008 10:08 
Subject:Re: Is async the answer
From:Niklas Edmundsson (nik@acc.umu.se)
Date:01/19/2008 03:53:54 AM
List:org.apache.httpd.dev

On Fri, 18 Jan 2008, Ruediger Pluem wrote:

The proxy that the LiveJournal folks wrote, I think, copies all the data from the origin server into a file and then uses sendfile to send to the client...

Erm, so does the one we wrote, mod_disk_cache ;p

IMHO it doesn't for the first request of the entity (the request that causes the entity to be cached)

Which is why it doesn't scale with large files, and I hacked it to do that to be usable with DVD images on ftp.acc.umu.se (http://issues.apache.org/bugzilla/show_bug.cgi?id=39380 - you might remember the first try to merge some of it). Yes, it has its flaws, but it solves the problem for us. I think that some people has tried it in a proxy setting too with pretty OK result. But this was really off-topic ;)

Getting to the point, I share Brians concerns with going async just for the async sake, for similar reasons:

- People are having problems with making modules even thread safe (see mod_example), forcibly adding async to the mix will raise the bar even higher for people who needs to whip up a simple module. - Callback semantics are messy when they go wrong, debugging can be a pain. - Threads are rather cheap, even on linux since the advent of NPTL. - Performance benefits are unclear.

Given that, there are obvious optimisations that can be, and have been, made. The ones in trunk aimed at not hogging a worker thread for simply writing the remaining data to the client for example. From what I've understood this class of changes doesn't really affect modules.

Also, if there is a way of adding async having it optional in modules then I see no problem with adding it as long as there are cases where it actually helps, other than adding it to the supported buzzwords list ;)