httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Havard" <>
Subject Re: newbie thread/process model question in hybrid server
Date Fri, 09 Jul 1999 17:37:33 GMT
On Tue, 6 Jul 1999 07:52:09 -0400 (EDT), Ryan Bloom wrote:

>Wow.  That's the big advantage of the hybrid server.  It also looks like
>the hybrid approach is MUCH more scalable than either process or thread
>based.  At least it is on any of the platforms we have looked at.

Why is hybrid more scalable than purely threaded (with proper kernel
threads)? What advantage is there in dividing the threads between multiple

>> Because of this I suspect that I can do a purely threaded approach and will
>> start doing an MPM for it once I figure out how to do that :)

Well I'm happy to say that I've actually got it working :)

It's pretty rough at the moment but I've successfully had it serving static
pages. I'll commit it some time soon so if anyone wants to they can take a
look and point out the huge errors I'm sure are there.....

I did hit one problem that may affect other platforms. In
http_protocol.c:ap_send_fd_length() it does:

        while ((n = read(fd, buf, o)) < 1 && 
                (errno == EINTR || errno == EAGAIN) && 

This would sometimes result in an endless loop as read() returns 0 on EOF
without changing errno. If there had been a previous EAGAIN or EINTR it loops
forever. Changing the 1 to a 0 fixes it, which I'll commit if nobody objects.

 |  Brian Havard                 |  "He is not the messiah!                   |
 |  |  He's a very naughty boy!" - Life of Brian |

View raw message