ngx_lua + proxy_next_upstream

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


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

> 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!):

> 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.


More information about the nginx mailing list