openresty/lua-upstream-nginx-module

[Feature Require] Can upstream backends be modified dynamically?

coooold opened this issue · 3 comments

Can upstream backends be modified dynamically, just like https://github.com/weibocom/nginx-upsync-module, via lua api?

BTW, it's recommended to use the balancer_by_lua* feature of ngx_lua for such requirements. It is much more flexible and can handle an unlimited number of possible backend servers at finest granularity:

https://github.com/openresty/lua-nginx-module/#balancer_by_lua_block

@agentzh But balancer_by_lua* cannot be used to unhardcode server itself, can it? The example under your link hardcodes server and uses the lua block for all things other than server.