httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Terbush <>
Subject Re: reliable piped logs
Date Mon, 07 Jul 1997 03:26:17 GMT
> On Sun, 6 Jul 1997, Marc Slemko wrote:
> > > Here's another one... have the parent open a pipe() to the logger, and
> > > a separate pipe() that multiplexes the children.  The parent shuffles
> > > bytes from the child pipe into the logger pipe.  It's ok to puke now,
> > > I'm just being thorough.
> > 
> > You know, that one isn't actually so bad if you ignore the fact that you
> > are adding another copy.  Unfortunately, that fact is a bit hard to
> > ignore.
> Hey maybe this is going somewhere.  Suppose the parent calls
> pipe(logger_fds).  When it forks the logger child it close(logger_fds[1]).
> When it forks the httpd children it close(logger_fds[0]).  If the logger
> dies, the parent still has an open handle to the pipe in write mode, so
> the children won't get EPIPE.  The parent can just fork another logger.
> The parent forks another logger when it sees the logger pid come back
> from wait().
> I'm going to go write a test program for this.
> Dean

Along these same lines, I've been stewing on the idea of a 
configuration server that was spawned at startup. It would make 
sense that the logger and config server could be the same process 
handling the double duty.

Also on this topic, for load balanced situations, it would be nice 
to be able to point one server to another as the primary log host, 
or even more cool, to give it a list of server priorities allowing 
it to fallback to an alternate log host if the first choice went 

View raw message