Once you have installed Openfire Enterprise 3.4.0 and clustering is enabled you are ready to load test the server. Load testing a server means that we are going to simulate thousands of users connecting to the server and generating a lot of traffic to the server.
The first step of a load test is to define the goals that you want to achieve. That means that you will need to know how many concurrent users you will have in your installation, the traffic that they will generate and the expected response time. More precisely, you have to figure out frequency users will change their presences, send messages, ask vCards or join rooms. Once you have defined your expected load and expected results you are ready for the next step which is Create User Accounts.
Log into the Admin Console and go to Users/Groups -> Users Creation
Specify a User prefix for example "usr". In this example, the script will generate accounts of the form: usr0, usr1, usr2, usr3, etc.
Specify the number of users to create and the amount of contacts in roster.
Let the script run. The script will run in background and it will print in the stdout the progress of the user creation. Note that creating hundreds of thousands of users may take some hours.
Finally, you need to setup the the load clients. Follow these steps:
Define how many linux machines you are going to use. Note that each linux machine may simulate 60K concurrent users. If you are using many network interfaces it's possible to generate 60K per network interface. You might need to fine tune your linux box to be able to generate 60K connections.
For each machine that will run the load test script you will need to:
Edit the OpenfireClusterStressTest.xml file
Set amount of users to simulate. All load clients should use the same amount
Set the user prefix to use. This value should match the one used in the userCreation plugin. In our example we used: "usr"
Set startUser to define range of user accounts to use. For example if it is set to 100, the first user to login is usr100, then usr101 and so on. Make sure that each node is using a different range of accounts.
cluster.node: Specify the IP address of hostname of each cluster node that is part of the cluster. Create a new node in the XML file for each cluster node
Make sure that server matches the XMPP domain being used by Openfire. You can get this value from the main page in the admin console.
Startup the openfire cluster (this includes your cluster nodes)
Run startup.bat for Windows or startup.sh for Linux in each load client
The stress test progress can be seen in the file clustertest.log and also in the openfire console admin
Once all users have logged in the stress test will continue generating traffic until you stop it. Hit any key to stop the load test script.
Problems or questions should be posted to the discussion forums.