Breaking content generation phase into multiple phases or adding custom events in content phase

Yichun Zhang (agentzh) agentzh at
Fri Jun 19 03:06:22 UTC 2015


On Thu, Jun 18, 2015 at 7:06 PM, Jeff Kaufman wrote:
> ngx_pagespeed does this by giving nginx a pipe to watch, setting up a
> handler for that pipe, calling an async api that uses threads, then
> the from the callback writing a byte to the pipe.  Now when the async
> code finishes we're back on the nginx event loop in the pipe's
> handler.

Extra OS threads add their own complexity and overhead (killing C10K,
for example), which I think we should avoid wherever we can (well,
disk I/O cannot be nonblocking and we should only use thread pools for

Well, just my 2 cents.


More information about the nginx-devel mailing list