Making parallel subrequests in a module

2019-09-17 Thread salmaanp
Hi, I'm trying to make parallel network subrequests in my module. They work perfectly fine when run sequentially as follows. ``` ACCESS PHASE return create_subrequest1; ---> (NGX_AGAIN) return create_subrequest2; ---> (NGX_AGAIN) ``` To make it parallel, I removed the returns and called NGX_AGA

Re: Parallel subrequests

2014-04-09 Thread honwel
how to write a filter module after the postpone filter . if i change module's config file or complie file (auto/) ? any example? Posted at Nginx Forum: http://forum.nginx.org/read.php?2,245707,249183#msg-249183 ___ nginx mailing list nginx@nginx.org

Re: Parallel subrequests

2013-12-26 Thread Maxim Dounin
Hello! On Thu, Dec 26, 2013 at 11:21:42AM -0500, honwel wrote: > Excepting response: > "John abc" > > Not > Response1:"John" > Response2:"abc" > > Thanks for your patience! Yes. What I suggested is to write a filter which will transform Response1:"John" Response2:"abc" as available after t

Re: Parallel subrequests

2013-12-26 Thread honwel
Excepting response: "John abc" Not Response1:"John" Response2:"abc" Thanks for your patience! Posted at Nginx Forum: http://forum.nginx.org/read.php?2,245707,245864#msg-245864 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/l

Re: Parallel subrequests

2013-12-26 Thread Maxim Dounin
Hello! On Thu, Dec 26, 2013 at 10:38:20AM -0500, honwel wrote: > Yes,you are right. But I want combine the data like: > Subrequst1's response: "first name: John" > Subrequst2's response: "last name: abc" > > Excepting response: > "John abc" In this particular example, using a filter module aft

Re: Parallel subrequests

2013-12-26 Thread honwel
Yes,you are right. But I want combine the data like: Subrequst1's response: "first name: John" Subrequst2's response: "last name: abc" Excepting response: "John abc" Posted at Nginx Forum: http://forum.nginx.org/read.php?2,245707,245860#msg-245860 __

Re: Parallel subrequests

2013-12-26 Thread Maxim Dounin
Hello! On Thu, Dec 26, 2013 at 07:50:01AM -0500, honwel wrote: > hi, agentzh > > There is also a problem that how can hold the one subrequest's response > meanwhile waiting others(subrequest) comes, then combine the all > response(data) and send it to client? is it possible? > thanks a

Re: Parallel subrequests

2013-12-26 Thread honwel
hi, agentzh There is also a problem that how can hold the one subrequest's response meanwhile waiting others(subrequest) comes, then combine the all response(data) and send it to client? is it possible? thanks a lot! Best regards, honwel Posted at Nginx Forum: http://forum.nginx.org/

Re: Parallel subrequests

2013-12-25 Thread honwel
ok, thanks. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,245707,245835#msg-245835 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: Parallel subrequests

2013-12-25 Thread Yichun Zhang (agentzh)
Hello! On Tue, Dec 24, 2013 at 11:14 PM, honwel wrote: > but ngx_http_subrequest() not supports POST method, so, What > do I need to pay attention, if i just modify to : > sr->method = NGX_HTTP_POST > sr->http_version = r->http_version; > ... > > sr->method_name = r->m

Re: Parallel subrequests

2013-12-24 Thread honwel
hi, Maxim It is seem like that ngx_http_subrequest() supports only GET method: sr->method = NGX_HTTP_GET; sr->http_version = r->http_version; ... sr->method_name = ngx_http_core_get_method; In my application currently, NGINX received a POST request and

Re: Parallel subrequests

2013-12-19 Thread honwel
Ok,thanks a lot,I will try. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,245707,245726#msg-245726 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: Parallel subrequests

2013-12-19 Thread Maxim Dounin
uot; issue that " Subrequests > might need to access the network, and if so, Nginx needs to return to its > other work while it waits for a response. So we need to check the return > value of ngx_http_subrequest" > How to write a Parallel subrequests which several subrequest

Parallel subrequests

2013-12-18 Thread honwel
eds to return to its other work while it waits for a response. So we need to check the return value of ngx_http_subrequest" How to write a Parallel subrequests which several subrequests by POST in parallel rather than one by one after received preivous response ? thanks. best regards honw