tell me your feature request about nginx

Igor Sysoev is at
Fri Jun 13 23:44:58 MSD 2008

On Thu, Jun 12, 2008 at 07:08:16PM -0400, Dan M wrote:

> On Thu, Jun 12, 2008 at 6:49 PM, Micha? Jaszczyk <jasiu85 at> wrote:
> > some ideas about what cool feature could Nginx have? I could implement
> > it then :).
> Personally,  I'd love to see it log it to pipes instead of files. Then
> I can use my favorite loggers that give TAI timestamps and rotate on
> file size, and keep a predefined number of logs. This has great
> advantages - you can precisely estimate disk space for logs for
> instance. I don't think it should be a daemon's job to write logs.
> Plenty of great external tools for that - multilog from daemontools,
> runit from Gerrit Pape, etc.

FreeBSD's newsyslog can be run by cron every minute to rotate logs based
on file size and to keep a predefined number of logs.
There is no sense to log to a pipe to achieve this.
Logging to pipe causes useless context switches, memory copy operations,
and CPU cache trashes:

1)  nginx writes to pipe
    copy operation
    context switch
2)  logger read from pipe
    copy operation
3)  logger writes to file
    copy operation
    context switch

instead of single copy operation.

> Drop of root priveleges once it's bound and chroot as well. Even
> Lighttpd does that.

Lighttpd drops root because it handles client connections in single process.
nginx handles the connections in worker process that run as unprivileged user.

Igor Sysoev

More information about the nginx mailing list