nGrinder 集羣模式配置

        前文已經介紹了nGrinder 集羣模式基本框架,本文就要涉及具體配置了! node

        假設你們已經對nGrinder 單一模式配置方法有所瞭解。 sql

  • 在nGrinder集羣模式下多個Controller端使用同一DB和文件系統.因此首先要作的就是搭建好共享文件系統,確認${NGRINDER_HOME} 文件夾。

          在${NGRINDER_HOME}/system.conf 也要有以下配置 框架

# if you want to enable ngrinder controller clustering. please enable below.
ngrinder.cluster.mode = true
 
# cache cluster uri of all clustered controller servers.
# only the controller and agents in same region will work together.
ngrinder.cluster.uris=xx.xx.xx.xx;xx.xx.xx.xx
 
# cache cluster listener port.
ngrinder.cluster.listener.port=40003
  • 第二步就要在每一個Controller端添加本地文件夾${NGRINDER_EX_HOME} 。不像${NGRINDER_HOME},這個文件夾必須手動建立,文件system-ex.conf 配置以下

# region setting of this controller.
# When running ngrinder as cluster mode, the ${NGRINDER_HOME} should be shared by multiple controllers.
# We expect this to be done by running ${NGRINDER_HOME} on NFS.
# However this option is not to set here. Because each controller in cluster must have system-ex.conf
# which should be stored in ${NGRINDER_EX_HOME} in the local so that each node cluster looks different value. 
# Please locate followings this on the ${NGRINDER_EX_HOME}(by default .ngrinder_ex)/system-ex.conf
ngrinder.cluster.region=Beijing
通過以上配置,咱們只要將全部Controller 從新啓動,就能夠了!


在集羣模式下,Agent的配置也會有所不一樣。Agent只有設置IP和區域(與Controller 區域相同)才能鏈接對應Controller。 this

全部Agent配置文件" ~/.ngrinder-agent" spa

agent.console.ip=controller ip
agent.console.port= controller port
agent.region={controller region}

若是是用戶要配置本身所屬Agent code

agent.console.ip=controller ip
agent.console.port= controller port
agent.region={controller region}
相關文章
相關標籤/搜索