Upstream module usage to process data

isolomka nginx-forum at forum.nginx.org
Tue May 30 07:45:15 UTC 2017


Hi Maxim,
Thanks for quick response.
I've implemented all upstream callbacks and upstream seems to work fine
now.

But i still have the open question how to avoid sending received data from
upstream to the downstream client.
As I said, I need to process received data first and after that send result
to output. 

As i see in the ngx_http_upstream_process_non_buffered_request()  buffers
are sent to output if out_bufs are not empty:
 if (u->out_bufs || u->busy_bufs) {
                rc = ngx_http_output_filter(r, u->out_bufs);

So is it a normal design from nginx point of view to store data in own
buffer (not in u->out_bufs ) to avoid call to ngx_http_output_filter?
I will call it later with my own chain of buffers when all data will be
correctly processed.

Thanks,
Ihor

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,274486,274501#msg-274501



More information about the nginx mailing list