Nginx 主动/主动集群设置

Nginx 主动/主动集群设置

我目前正在尝试使用以下命令在 Active/Active 配置中配置一对负载平衡服务器:

  1. Nginx
  2. Corosync
  3. 起搏器

已按照适用说明进行操作从头开始构建集群

但是根据以下 crm_mon 输出,我不知道集群是否在 Active-Active 配置下运行。任何提示或建议都将不胜感激。

============
Last updated: Mon Oct 29 16:58:32 2012
Last change: Mon Oct 29 11:06:38 2012 via cibadmin on test2
Stack: openais
Current DC: test2 - partition with quorum
Version: 1.1.7-6.el6-148fccfd5985c5590cc601123c6c16e966b85d14
2 Nodes configured, 2 expected votes
2 Resources configured.
============

Online: [ test2 test ]

 Clone Set: ClusterIP_clone [ClusterIP] (unique)
     ClusterIP:0    (ocf::heartbeat:IPaddr2):   Started test
     ClusterIP:1    (ocf::heartbeat:IPaddr2):   Started test2

这是 corosync.conf 文件:

compatibility: whitetank

aisexec {
    user: root
    group: root
}

service {
    name: pacemaker
    ver: 0
}

totem {
    version: 2
    secauth: off
    crypto_cipher: none
    crypto_hash: none
    cluster_name: gmotest
    interface {
        member {
            memberaddr: 192.168.0.3
        }
        member {
            memberaddr: 192.168.0.4
        }
        ringnumber: 0
        bindnetaddr: 192.168.0.0
        mcastport: 5405
        ttl: 1
    }
    transport: udpu
}

logging {
    fileline: off
    to_logfile: yes
    to_syslog: yes
    debug: on
    logfile: /var/log/cluster/corosync.log
    debug: off
    timestamp: on
    logger_subsys {
            subsys: AMF
            debug: off
    }
}

amf {
     mode: disabled
}

执行的命令:

configure property stonith-enabled=false
configure primitive ClusterIP ocf:heartbeat:IPaddr2 params ip=192.168.0.2 cidr_netmask=24 clusterip_hash="sourceip" op monitor interval=30s    
cib new active
configure clone ClusterIP_clone ClusterIP meta globally-unique="true" clone-max="2" clone-node-max="2"
cib commit active

相关内容