On Thu, Jul 13, 2017 at 7:36 PM, Luca Toscano <toscano.l...@gmail.com> wrote: > > 1) read the FCGI headers to gather how much data the record is carrying > (clen) > 2) read the data in iobuf_size batches, sending each time the bytes > collected to the output filter chain. > 3) finally read the padding bytes (if any). > > I tried to use the same trick as mod_ajp for flushpackets=auto, but apr_poll > returned immediately most of the times due to the padding bytes ready to > read (took me a while to realize this simple thing).
I forgot some details about proxy_fcgi so am asking before (re)looking at it :p Can't we poll() after 3) ? If so, maybe we could flush only if a small/zero timeout poll() times out, and hence still be able to coalesce multiple (closed) records. Regards, Yann.