Closed zhvala closed 3 years ago
init_master.lua
global_chash = require("resty.chash"):new(my_nodes) ngx.timer.every( -- update nodes every 15s 15, function() local nodes = get_my_nodes() global_chash:reinit(nodes) end )
location / { content_by_lua ' ... local node = global_chash:find(my_hash_key) ... '; }
Is this concurrency safe here?
init_master.lua
Is this concurrency safe here?