Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
codjust opened this issue Sep 12, 2018 · 3 comments

Comments

@codjust
Copy link

codjust commented Sep 12, 2018

 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是做不到的,不知道是不是姿势不对,希望能得到回复,谢谢

@strongit
Copy link

strongit commented Dec 6, 2018

同求

@huangnauh
Copy link
Collaborator

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

@strongit
Copy link

strongit commented Dec 6, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants