Load Balancing Between Virtual Box
After a few try and error, I figure out the best tutorial to make Nginx load balancing works.
$ sudo gedit /etc/nginx/conf.d/loadbalancer.conf
upstream backend {server 192.168.56.110;server 192.168.56.120;
server 192.168.56.130;
server 192.168.56.120;
}server {listen 80 default_server;listen [::]:80 default_server;location / {proxy_set_header X-Real-IP $remote_addr;proxy_redirect off;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;proxy_set_header Host $http_host; proxy_pass http://backend; }}
$ sudo nginx -t
$ sudo systemctl restart nginx $ sudo systemctl enable nginx
Ref: https://www.tecmint.com/use-nginx-as-http-load-balancer-in-linux/amp/
Image Credit : https://www.serverlab.ca/tutorials/windows/web-servers/load-balancing-web-servers-with-windows-server-2012-r2/
Langgan:
Catat Ulasan
(
Atom
)
Tiada ulasan :
Catat Ulasan