keepalive双主模型的ipvs高可用集群

1 实验环境

keepalive双主模型的ipvs高可用集群_第1张图片

2 首先node1,node2配置成双主,实现二个虚拟地址172.16.28.6;172.16.28.4飘移,配置过程同上一个实验

3 配置node1,node2的ipvs

virtual_server 172.16.28.6 80 {
    delay_loop 6
    lb_algo rr
    lb_kind DR
    protocol TCP

    real_server 172.16.28.30 80 {
        weight 1
        HTTP_GET {
            url {
              path /
              status_code 200
            }
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
        }
    }
    real_server 172.16.28.31 80 {
        weight 1
        HTTP_GET {
            url {
              path /
              status_code 200
            }
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
        }
    }

}

virtual_server 172.16.28.4 80 {
    delay_loop 6
    lb_algo rr
    lb_kind DR
    protocol TCP

    real_server 172.16.28.30 80 {
        weight 1
        HTTP_GET {
            url {
              path /
              status_code 200
            }
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
        }
    }
        real_server 172.16.28.31 80 {
        weight 1
        HTTP_GET {
            url {
              path /
              status_code 200
            }
            connect_timeout 3
            nb_get_retry 3
            delay_before_retry 3
        }
    }
}

4 分别对虚拟地址172.16.28.6; 172.16.28.4访问测试

keepalive双主模型的ipvs高可用集群_第2张图片
keepalive双主模型的ipvs高可用集群_第3张图片

你可能感兴趣的:(keepalive双主模型的ipvs高可用集群)