Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Controller Clustering Guide


Change list:

  • This feature is available from 3.1


We enhance nGrinder with cluster mode in its version 3.1 .

If you don’t know about nGrinder cluster, please refer to Cluster Architecture

As follows is nGrinder cluster mode configuration.  Assuming you have been familiar with nGrinder in Single Mode. As your know all the nGrinder controllers will use the same DB and file system in cluster mode, So what we should do firstly is to run the ${NGRINDER_HOME} on the NAS and all controllers should share this folder. And edit ${NGRINDER_HOME}/system.conf like followings.  

# 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

And secondly creating system-ex.conf under for each controller in ${NGRINDER_EX_HOME} folder. ${NGRINDER_EX_HOME} folder is .ngrinder_ex as default. Not like ${NGRINDER_HOME}, ${NGRINDER_EX_HOME} is not automatically created. and you should make it local system not shared by other controller. Create ${NGRINDER_EX_HOME} folder and put this option into system-ex.conf file

# 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

After finish this configuration, just restart all nGrinder controllers and login. We will see this icon at headline!

image

If you want to put the L4 or load balancer in front of all controllers, you should set it up as sticky session so that each client connects only one controller. Otherwise, users may login everytime they access difference controller.


After the configuration on controller, you should also set the region info for all agents. As you should know, we should set the controller IP for agents. And every agent will connect to one controller and belong to one region of that controller. Maybe you will think we don't need to set the region in agent's configuration. But for some consistency reason, we also need to set the region for agent. Otherwise, the agents can not be used.

So, for every agents, open the {NGRINDER_AGENT_HOME} directory, by default it is " ~/.ngrinder-agent". And set as below:

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

And for user owned agent, it should be like:

    • agent.console.ip=controller ip
    • agent.console.port= controller port
    • agent.region={controller region}_owned_{userID}

comments powered by Disqus
Page info
viewed 649 times
translations ko en
Author
posted 5 months ago by
Matt
Contributors
updated 4 months ago by
View revisions
Share this article