lua-resty-checkups icon indicating copy to clipboard operation
lua-resty-checkups copied to clipboard

您好,这个能支持动态新增或删除upstream指令块吗?就是不需要在nginx.conf里面加

Open codjust opened this issue 6 years ago • 3 comments

 upstream backend {
        server 0.0.0.0;
        balancer_by_lua_block {
            require "wario.balancer"
        }
    }

如上面的代码块,lua-resty-checkups提供的update和delete好像都是预先需要在nginx.conf里面声明了一个backend,才能去动态变更后段的servers,能不能连这个指令也能通过lua来创建呢?

因为我试过lua-resty-checkups的api是做不到的,不知道是不是姿势不对,希望能得到回复,谢谢

codjust avatar Sep 12 '18 06:09 codjust

同求

strongit avatar Dec 06 '18 01:12 strongit

update_upstream 可以更新一个没有在 nginx.conf 中配置的 upstream,然后可以在如上所示的 wario.balancer 中通过 select_peer 来选择更新的 upstream

huangnauh avatar Dec 06 '18 02:12 huangnauh

https://github.com/yzprofile/ngx_http_dyups_module 这个比较6,但是好像不支持tcp upstream dynamic change and active health check

strongit avatar Dec 06 '18 06:12 strongit