Re: Upstream module usage to process data

2017-05-31 Thread isolomka
So my design seems to be wrong. Thanks a lot for assistance. Posted at Nginx Forum: https://forum.nginx.org/read.php?2,274486,274548#msg-274548 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: Upstream module usage to process data

2017-05-31 Thread Maxim Dounin
Hello! On Wed, May 31, 2017 at 09:00:42AM -0400, isolomka wrote: > So I have my own module which is working with thread pool enabled. > ngx_http_upstream_init is called from my thread_event_handler, flag r->aio > is enabled. > In fact, upstream is not initialized at all. > > When i set aio flag

Re: Upstream module usage to process data

2017-05-31 Thread isolomka
So I have my own module which is working with thread pool enabled. ngx_http_upstream_init is called from my thread_event_handler, flag r->aio is enabled. In fact, upstream is not initialized at all. When i set aio flag to false and call to ngx_http_upstream_init, i'm getting a core dump in ngx_ep

Re: Upstream module usage to process data

2017-05-31 Thread Maxim Dounin
Hello! On Wed, May 31, 2017 at 08:22:07AM -0400, isolomka wrote: > Does upstream works correctly with thread pool enabled? Yes, it does. > I see some strange validation in ngx_http_upstream_init_request() > if (r->aio) { > return; > } > that flag is set when thread pool is enabl

Re: Upstream module usage to process data

2017-05-31 Thread isolomka
Thanks for the answers. Does upstream works correctly with thread pool enabled? I see some strange validation in ngx_http_upstream_init_request() if (r->aio) { return; } that flag is set when thread pool is enabled. Posted at Nginx Forum: https://forum.nginx.org/read.php?2,274486

Re: Upstream module usage to process data

2017-05-30 Thread Maxim Dounin
Hello! On Tue, May 30, 2017 at 03:45:15AM -0400, isolomka wrote: > 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 c

Re: Upstream module usage to process data

2017-05-30 Thread isolomka
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 resul

Re: Upstream module usage to process data

2017-05-29 Thread Maxim Dounin
Hello! On Mon, May 29, 2017 at 06:04:05AM -0400, isolomka wrote: > Hi All, > I'm developing NGINX module which should read some binary data from upstream > server, process it an send response to the user. > So to do it i'm using ngx_http_upstream API to create upstream request and > get data. So

Upstream module usage to process data

2017-05-29 Thread isolomka
Hi All, I'm developing NGINX module which should read some binary data from upstream server, process it an send response to the user. So to do it i'm using ngx_http_upstream API to create upstream request and get data. So the question is where is the right point to start processing of received cha