ngx_lua + proxy_next_upstream

Yichun Zhang (agentzh) agentzh at gmail.com
Wed Sep 25 06:21:14 UTC 2013


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
graph. You'd better put your optimization efforts on something that is
truly measurable.

See also https://github.com/agentzh/nginx-systemtap-toolkit#ngx-sample-bt

> I wonder why share_all_vars is not safe. Any serious consideration / example / use case ? Why it's better to copy them instead ? (What about memory footprint etc).
>

Because of side effects involved in sharing variables between the
parent request and the subrequest. You can find such scary examples in
my Nginx tutorials (still under work!):

    http://openresty.org/download/agentzh-nginx-tutorials-en.html

> And I will probably send the questions to openresty group too.
>

It's just that you're more likely to get more responses more quickly
for such questions. That's all.

Regards,
-agentzh



More information about the nginx mailing list