Created
September 16, 2021 01:37
-
-
Save Gabriel-Paulucci/a1edc3df582839d2a9bba9ba08a19ee9 to your computer and use it in GitHub Desktop.
Nginx loadbalancer
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
upstream loadbalancer { | |
least_conn; | |
server 127.0.0.2 weight=5; | |
server 127.0.0.3 weight=5; | |
server 127.0.0.4; | |
server 127.0.0.5; | |
} | |
server { | |
listen 80; | |
server_name loadbalancer.com; | |
location / { | |
proxy_pass http://loadbalancer; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment