Last active
July 29, 2019 02:41
-
-
Save Aisuko/ab606028a9efd46df9c83c9a6e38a5d1 to your computer and use it in GitHub Desktop.
The nginx config for Rancher HA LoadBalance.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
worker_processes 4; | |
worker_rlimit_nofile 40000; | |
events { | |
worker_connections 8192; | |
} | |
stream { | |
upstream rancher_servers_http { | |
least_conn; | |
server <IP_NODE_1>:80 max_fails=3 fail_timeout=5s; | |
server <IP_NODE_2>:80 max_fails=3 fail_timeout=5s; | |
server <IP_NODE_3>:80 max_fails=3 fail_timeout=5s; | |
} | |
server { | |
listen 80; | |
proxy_pass rancher_servers_http; | |
} | |
upstream rancher_servers_https { | |
least_conn; | |
server <IP_NODE_1>:443 max_fails=3 fail_timeout=5s; | |
server <IP_NODE_2>:443 max_fails=3 fail_timeout=5s; | |
server <IP_NODE_3>:443 max_fails=3 fail_timeout=5s; | |
} | |
server { | |
listen 443; | |
proxy_pass rancher_servers_https; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment