Skip to content

Instantly share code, notes, and snippets.

@Gabriel-Paulucci
Created September 16, 2021 01:37
Show Gist options
  • Save Gabriel-Paulucci/a1edc3df582839d2a9bba9ba08a19ee9 to your computer and use it in GitHub Desktop.
Save Gabriel-Paulucci/a1edc3df582839d2a9bba9ba08a19ee9 to your computer and use it in GitHub Desktop.
Nginx loadbalancer
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