前文已經介紹了nGrinder 集羣模式基本框架,本文就要涉及具體配置了! node
假設你們已經對nGrinder 單一模式配置方法有所瞭解。 sql
在${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
# 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}