Re: ngx_lua + proxy_next_upstream

2013-09-24 Thread Yichun Zhang (agentzh)
Hello! On Tue, Sep 24, 2013 at 3:39 PM, pigmej wrote: > Yeah, I meant rewrite obviously... I would still prefer to not have even > rewrite if it's possible. > It's not worth saving at all. If you take an on-CPU Flame Graph for your loaded Nginx worker processes, you'll never even see it on the

Re: ngx_lua + proxy_next_upstream

2013-09-24 Thread pigmej
y send the questions to openresty group too. Thanks for your replies. -Original Message- From: "Yichun Zhang (agentzh)" Sender: nginx-bounces@nginx.orgDate: Tue, 24 Sep 2013 13:28:06 To: Reply-To: nginx@nginx.org Subject: Re: ngx_lua + proxy_next_upstream Hello! On Tue, Sep

Re: ngx_lua + proxy_next_upstream

2013-09-24 Thread Yichun Zhang (agentzh)
Hello! On Tue, Sep 24, 2013 at 2:35 AM, Jedrzej Nowak wrote: > > The question is how can I do NOT redirect ? Well, "rewrite ... break" is not a redirect. It is just an internal URI rewrite. That's all. > I tried with @test instead of > /test but no success. Is there any other way to do that ? >

Re: ngx_lua + proxy_next_upstream

2013-09-24 Thread Jedrzej Nowak
Ok, I still have some problems. It works but not perfectly. My config is: location /test { internal; rewrite /test(.*) $1 break; proxy_buffering off; proxy_set_headerHost $host;

Re: ngx_lua + proxy_next_upstream

2013-09-23 Thread Jedrzej Nowak
Hey, Thanks for your reply. Is there any good "example" of thing what I want to archive ? Shall I create something like: location @blah { # here the "normal" configuration for LB } location / { # here the LUA logic # probably with share_all_vars=true # subrequest to @blah }

Re: ngx_lua + proxy_next_upstream

2013-09-19 Thread Yichun Zhang (agentzh)
Hello! On Wed, Sep 18, 2013 at 6:09 AM, Jedrzej Nowak wrote: > The question is how can I archive proxy_next_upstream. > Preferably I would like to return to lua with a error reason. > If the only way is to return several servers in upstream from lua, how to do > so ? > If you want to return the c

ngx_lua + proxy_next_upstream

2013-09-18 Thread Jedrzej Nowak
Hello, I have configured: 1. ngx_lua as rewrite_by_lua_file 2. lua returns upstream 3. Nginx connects to the upstream Works perfectly. The question is how can I archive proxy_next_upstream. Preferably I would like to return to lua with a error reason. If the only way is to return several servers