Welcome! Log In Create A New Profile

Advanced

Re: Parallel subrequests for multi-source long polling?

November 20, 2009 03:33AM
Piotr Sikora Wrote:
-------------------------------------------------------
> > I figure the trickiest part will be building
> those requests and getting
> > them in to state that's usable by nginx.
>
> This is already done, so there isn't much to
> figure out ;)
>
> Just create "independent" request:
> r = ngx_supervisord_init(pool, uscf);
> and then you can inject it into regular nginx's
> flow:
> ngx_http_upstream_init(r);
>
> You just need to create your own u->peer.get(),
> u->peer.free(),
> u->create_request() and u->finalize_request()
> functions.
>
> That's of course, if you give up on subrequests.
>
> Best regards,
> Piotr Sikora < piotr.sikora@frickle.com >

Awesome, I got it fully working using this method. I gave up my battle against the subrequests and switched over to creating new requests in the same manner as your supervisord module. There's a bit more trickiness needed, since these new requests will need some of the pieces of the original request (some of the original request's configuration, headers and server variables in my case).

I don't have the headers working completely correctly yet, but everything else seems to work perfectly.

I might be able to package this up as a generic subrequest replacement. At the very least, I'll clean up the code and post it somewhere for everyone's perusal.

Thanks a bunch to both of you (Piotr and Agentzh) for your help.

--Shaun
Subject Author Posted

Parallel subrequests for multi-source long polling?

shaun November 18, 2009 01:30AM

Re: Parallel subrequests for multi-source long polling?

Piotr Sikora November 18, 2009 02:28AM

Re: Parallel subrequests for multi-source long polling?

agentzh November 18, 2009 03:28AM

Re: Parallel subrequests for multi-source long polling?

agentzh November 18, 2009 03:30AM

Re: Parallel subrequests for multi-source long polling?

shaun November 18, 2009 04:22AM

Re: Parallel subrequests for multi-source long polling?

agentzh November 18, 2009 11:30PM

Re: Parallel subrequests for multi-source long polling?

shaun November 19, 2009 03:54AM

Re: Parallel subrequests for multi-source long polling?

agentzh November 19, 2009 04:58AM

Re: Parallel subrequests for multi-source long polling?

agentzh November 19, 2009 06:32AM

Re: Parallel subrequests for multi-source long polling?

shaun November 19, 2009 02:20PM

Re: Parallel subrequests for multi-source long polling?

Piotr Sikora November 19, 2009 03:28PM

Re: Parallel subrequests for multi-source long polling?

shaun November 19, 2009 04:08PM

Re: Parallel subrequests for multi-source long polling?

Piotr Sikora November 19, 2009 05:42PM

Re: Parallel subrequests for multi-source long polling?

shaun November 20, 2009 03:33AM

Re: Parallel subrequests for multi-source long polling?

Piotr Sikora November 20, 2009 04:48AM

Re: Parallel subrequests for multi-source long polling?

agentzh November 20, 2009 05:28AM

Re: Parallel subrequests for multi-source long polling?

shaun November 20, 2009 06:41AM

Re: Parallel subrequests for multi-source long polling?

shaun November 21, 2009 09:12PM

Re: Parallel subrequests for multi-source long polling?

Piotr Sikora November 21, 2009 10:10PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 115
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready