i am testing my proxy server by new version of openresty (1.21.4), and i have a big problem
in load test
my nginx config just :worker 1;
and i have some code like this:
rewrite_by_lua_block {
local t = {["1.2.3.4"] = { ["weight"] = 1}, ["4.5.6.7"] = { ["weight"] = 2}}
ngx.ctx.t = t
}
balancer_by_lua_block{
localt = ngx.ctx.t
for key, value in pairs(t) do print(key) end -- output is empty
for key, value in pairs(t) do print(key) end -- have output
}
The original issue was reported in google group.
https://groups.google.com/g/openresty-en/c/4DXfmYSU7Jo/m/bUajTOB0AQAJ?utm_medium=email&utm_source=footer
i am testing my proxy server by new version of openresty (1.21.4), and i have a big problem in load test my nginx config just :worker 1; and i have some code like this: