proyectos:linuxservidor-cluster-load
Tabla de Contenidos
Generalidades
Referencias
haproxy
Comandos
apt install haproxy systemctl restart haproxy systemctl status haproxy haproxy -c -f /etc/haproxy/haproxy.cfg tail -f /var/log/haproxy.log cp haproxy.cfg haproxy.cfg.orig
Archivos
/etc/haproxy/haproxy.cfg
Opciones
mode tcp option tcplog frontend www bind 192.168.0.210:80 default_backend nginx-backend backend nginx-backend balance roundrobin mode tcp server nginx-1 172.16.0.106:80 check server nginx-1 172.16.0.112:80 check
Referencias
nginx
Comandos
apt install nginx-light
systemctl restart nginx
systemctl status nginx
Archivos
/etc/nginx/sites-enabled/default
Opciones
upstream backend { # ip_hash; server 172.16.0.106 max_fails=3 fail_timeout=15s weight=1; server 172.16.0.112 max_fails=3 fail_timeout=15s weight=1; server 172.16.0.113 max_fails=3 fail_timeout=15s weight=1 down; } server { listen 80 default_server; listen [::]:80 default_server; //... location / { proxy_pass http://backend; try_files $uri $uri/ =404; } }
Referencias
proyectos/linuxservidor-cluster-load.txt · Última modificación: por manuel.floresv