Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
systemes:web:keepalived [2016/01/28 11:34]
william
systemes:web:keepalived [2019/02/06 14:03] (Version actuelle)
Ligne 3: Ligne 3:
 <callout type="primary"> <callout type="primary">
 ===== Introduction ===== ===== Introduction =====
-Keepalived est un logiciel de routage. Le principal objectif de ce projet est de mettre en place du loadbalancing et/ou de la haute disponibilité pour les système Linux et des infrastructures basées sur Linux. Le Loadbalancing repose sur Linux Virtual Server (IPVS) et la haute disponibilité fonctionne via le protocole VRRP.+Keepalived est un logiciel de routage. Le principal objectif de ce projet est de mettre en place du loadbalancing et/ou de la haute disponibilité pour les systèmes Linux et des infrastructures basées sur Linux. Le Loadbalancing repose sur Linux Virtual Server (IPVS) et la haute disponibilité fonctionne via le protocole VRRP.
 </callout> </callout>
  
Ligne 15: Ligne 15:
 </code> </code>
  
-==== Configuration ====+==== Configuration Actif/Passif ====
  
-Dans le cas d'une infra web avec deux proxys en amont, en état master/slave. Dont un actif, et l'autre est en secours +Dans le cas d'une infrastructure web avec deux proxys en amont, en état master/slave, dont un actif, et l'autre est en secours 
  
   * Serveur Proxy1 :   * Serveur Proxy1 :
   * <file bash /etc/keepalived/keepalived.conf>   * <file bash /etc/keepalived/keepalived.conf>
 +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +#
 +# Configuration Keepalived: FailOver
 +#
 +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 + 
 global_defs { global_defs {
   notification_email   notification_email
Ligne 58: Ligne 64:
   * Serveur Proxy2 :   * Serveur Proxy2 :
   * <file bash /etc/keepalived/keepalived.conf>   * <file bash /etc/keepalived/keepalived.conf>
 +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +#
 +# Configuration Keepalived: FailOver
 +#
 +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +
 global_defs { global_defs {
   notification_email   notification_email
Ligne 94: Ligne 106:
  
  
 +==== Configuration Actif/Actif ====
  
 +Dans le cas d'une infrastructure ldap avec deux proxys en amont, les deux étant actif dont ldap2 reçoit deux fois plus de requêtes que ldap1
 +
 +  * Serveur LDAP1 :
 +  * <file bash /etc/keepalived/keepalived.conf>
 +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +#
 +# Configuration Keepalived: FailOver & Round Robin Pondéré
 +#
 +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 + 
 + 
 +global_defs {
 +  notification_email {
 +user@domaine.fr
 +}
 +  notification_email_from ldaptest1@domaine.fr
 +  smtp_server IP_SMTP
 +  smtp_connect_timeout 30
 +}
 + 
 + 
 + 
 +vrrp_instance VI-LDAP1 {
 +  state MASTER
 +  virtual_router_id 25
 +  priority 150
 +  interface eno16777984
 +  protocol TCP
 + 
 +  virtual_ipaddress {
 +    IP_VIP/24 brd 1.2.3.255 dev em1
 +  }
 + 
 +  smtp_alert
 +  advert_int 10
 + 
 + 
 +  notify_master "/etc/keepalived/script_ipvs_backup.sh del IP_VIP"
 +  notify_backup "/etc/keepalived/script_ipvs_backup.sh add IP_VIP"
 +  notify_fault "/etc/keepalived/script_ipvs_backup.sh add IP_VIP"
 + 
 +  authentication{
 +  auth_type AH
 +  auth_pass password
 +  }
 + 
 +}
 + 
 + 
 +virtual_server IP_VIP 389 {
 +    delay_loop 10
 +    lb_algo rr
 +    lb_kind DR
 +    protocol TCP
 + 
 +    real_server IP_LDAP1 389 {
 +            weight 1
 +            TCP_CHECK {
 +                 connect_port    389
 +                 connect_timeout 5
 +            }
 +    }
 + 
 +    real_server IP_LDAP2 389 {
 +            weight 2
 +            TCP_CHECK {
 +                connect_port    389
 +                connect_timeout 5
 +            } 
 +    }
 + 
 +}
 + 
 +virtual_server IP_VIP 636 {
 +    delay_loop 10
 +    lb_algo rr
 +    lb_kind DR
 +    protocol TCP
 + 
 +    real_server IP_LDAP1 636 {
 +            weight 1
 +            MISC_CHECK {
 +              misc_path "/etc/keepalived/script_check_ssl.sh IP_LDAP1"
 +            }
 + 
 +    }
 + 
 +    real_server IP_LDAP2 636 {
 +            weight 2
 +            MISC_CHECK {
 +              misc_path "/etc/keepalived/script_check_ssl.sh IP_LDAP2"
 +            }
 +}
 +
 +</file>
  
 [[systemes:start|Retour]] [[systemes:start|Retour]]
  • systemes/web/keepalived.1453977241.txt.gz
  • Dernière modification: 2019/02/06 14:02
  • (modification externe)