nginx-proxy-manager
nginx-proxy-manager copied to clipboard
feat(streams): Simple Load Balancing of Streams
Credit to https://github.com/eedev - Their PR was marked stale: https://github.com/NginxProxyManager/nginx-proxy-manager/pull/1999
Motivation
I wanted to use Nginx Proxy Manager to do some simple load balancing for a EMQX cluster, seems I am not alone:
- #156
- #1963
- #2840
Description
I followed #1999 - unfortunately, that PR is very stale, so it was easier to branch off of upstream develop and re-implement the changes and perform the eslint fixes.
If your stream contains multiple upstreams - it will use the least connection strategy and max_fails=3
Alternative Approaches
A more robust solution would allow for specifying the upstream port for each of the forwarding hosts (upstreams). I did toy around with this but decided it was more work than I wanted to do right now and was worried it may break other user configurations.
Future Enhancements
- Advanced Options: Load Balancing Strategies, Allow Different Ports per Upstream, Other Proxy Settings
- SSL
Screenshots
Docker Image for build 2 is available on DockerHub as jc21/nginx-proxy-manager:github-pr-3841
Note: ensure you backup your NPM instance before testing this PR image! Especially if this PR contains database changes.
希望能把此pr能合并,正需要此功能
Please merge it
this would be great, thanks
+1
+1