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

how to support multiple nodes balance on MQTT proxy? #5304

Closed
ccwxl opened this issue Oct 21, 2021 · 7 comments
Closed

how to support multiple nodes balance on MQTT proxy? #5304

ccwxl opened this issue Oct 21, 2021 · 7 comments

Comments

@ccwxl
Copy link

ccwxl commented Oct 21, 2021

Issue description

mqtt 代理如何配置可以支持多节点负载均衡?

Environment

  • apisix version (cmd: apisix version): 2.10.0
  • OS (cmd: uname -a): macos
  • OpenResty / Nginx version (cmd: nginx -V or openresty -V):
  • etcd version, if have (cmd: run curl http://127.0.0.1:9090/v1/server_info to get the info from server-info API):
  • apisix-dashboard version, if have:
  • the plugin runner version, if the issue is about a plugin runner (cmd: depended on the kind of runner):
  • luarocks version, if the issue is about installation (cmd: luarocks --version):
@juzhiyuan juzhiyuan changed the title request help: mqtt proxy help how to support multiple nodes balance on MQTT proxy? Oct 22, 2021
@ccwxl
Copy link
Author

ccwxl commented Oct 22, 2021

@juzhiyuan 有方法没?

@juzhiyuan
Copy link
Member

I just took a look at https://github.com/apache/apisix/blob/master/apisix/stream/plugins/mqtt-proxy.lua#L31-L43 .

It only supports one node 🤔 need @tzssangglass's confirm.

@tzssangglass
Copy link
Member

I'm not sure,a all I see in the test cases of MQTT plugin is single node in upstream, maybe you could configure multiple nodes in upstream to try it?

@tokers
Copy link
Contributor

tokers commented Oct 25, 2021

Currently, only one endpoint can be configured in the MQTT plugin, a feasible work around plan is add another indirect L4 proxy (we can just use the apisix itself), and let the MQTT proxy to the L4 proxy, configure an Upstream with multiple nodes in L4 proxy.

Of course, PR's welcome to extend the MQTT plugin.

@juzhiyuan
Copy link
Member

Currently, only one endpoint can be configured in the MQTT plugin, a feasible work around plan is add another indirect L4 proxy (we can just use the apisix itself), and let the MQTT proxy to the L4 proxy, configure an Upstream with multiple nodes in L4 proxy.

Of course, PR's welcome to extend the MQTT plugin.

Thanks for your explanation!

1 similar comment
@juzhiyuan
Copy link
Member

Currently, only one endpoint can be configured in the MQTT plugin, a feasible work around plan is add another indirect L4 proxy (we can just use the apisix itself), and let the MQTT proxy to the L4 proxy, configure an Upstream with multiple nodes in L4 proxy.

Of course, PR's welcome to extend the MQTT plugin.

Thanks for your explanation!

@spacewander
Copy link
Member

Solved by #5666

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

5 participants