Répartition de charge avec HAProxy

Intermédiaire LinuxHAProxy25 min50 XP

Trois serveurs d'application (10.0.20.11-13:8080) doivent être servis derrière HAProxy.

Exigences dans /etc/haproxy/haproxy.cfg :

  • frontend fe_web : bind *:80, default_backend be_app
  • backend be_app : balance roundrobin, vérification de santé HTTP option httpchk GET /health, les trois serveurs app1, app2, app3 avec check (ex. server app1 10.0.20.11:8080 check)
  • listen stats : bind *:8404, stats enable, stats uri /stats, stats auth admin:St4ts!2026
  • Validez (haproxy -c -f /etc/haproxy/haproxy.cfg) et rechargez

Contenu Premium

Ce contenu est inclus dans l'offre Premium. Le titre et le résumé restent visibles pour vous aider à choisir.

Tâches

  1. Frontend
  2. Backend avec santé
  3. Page de statistiques protégée
  4. Validé et rechargé