« Modèle:Config/Keepalived/TcpCheck » : différence entre les versions

De wiki.infini
import>Fleon
Aucun résumé des modifications
import>Fleon
Aucun résumé des modifications
Ligne 3 : Ligne 3 :
* VIP : {{{vip|xxx.xxx.xxx.xxx}}}
* VIP : {{{vip|xxx.xxx.xxx.xxx}}}
* PORT : {{{port|port}}}
* PORT : {{{port|port}}}
* BACKEND :  {{{hostname_backend_1|backend_1}}} -> {{{ip_backend_1|xxx.xxx.xxx.xxx}}} / {{{hostname_backend_1|backend_1}}} -> {{{ip_backend_2|xxx.xxx.xxx.xxx}}}
* BACKEND :  {{{hostname_backend_1|backend_1}}} -> {{{ip_backend_1|xxx.xxx.xxx.xxx}}} / {{{hostname_backend_2|backend_2}}} -> {{{ip_backend_2|xxx.xxx.xxx.xxx}}}
<br/>
<br/>
{{FileBox|filename={{{host|hostname}}} ~ nano /etc/keepalived/keepalived.conf | 1=
{{FileBox|filename={{{host|hostname}}} ~ nano /etc/keepalived/keepalived.conf | 1=

Version du 2 mars 2015 à 13:13

  • DNS : cname
  • VIP : xxx.xxx.xxx.xxx
  • PORT : port
  • BACKEND : backend_1 -> xxx.xxx.xxx.xxx / backend_2 -> xxx.xxx.xxx.xxx


File hostname ~ nano /etc/keepalived/keepalived.conf
...
####################################################
##  Description du service porté par le load balancer
virtual_server xxx.xxx.xxx.xxx port {
    delay_loop 6
    lb_algo rr
    lb_kind DR
    protocol TCP
    persistence_timeout 0

    real_server xxx.xxx.xxx.xxx port {
       weight 1
       TCP_CHECK {
           connect_port port
           connect_timeout 5
           nb_get_retry 5
           delay_before_retry 2
       }
    }

    real_server xxx.xxx.xxx.xxx port {
        weight 1
        TCP_CHECK {
           connect_port port
            connect_timeout 5
            nb_get_retry 5
            delay_before_retry 2
        }
    }
}