Search code examples
javajmeterload-balancing

Jmeter Load Balancing


I have 4 different servers and they do not have a load balancer on top of them to distribute incoming loads.in my local host i want to configure a load test with Jmeter and publish messages via mqtt plugin to these nodes.Is there any way to put load on the servers and simulate load balancing to distribute my messages on all 4 nodes equally?Is there any in-built Jmeter plugin for this kind of issue?

I read the documentaion and i do not think Jmeter Remote start all can solve my problem because at the end it is just trying to load test one node via some worker nodes.


Solution

  • You can put a JMeter Variable into "Server name or IP" field and use CSV Data Set Config to read the DNS hostname or IP address from the CSV file.

    If you put 4 hostnames or IP addresses into CSV file each virtual user will pick next line on each iteration and the load will be distributed evenly. You can choose any other ratio of entries, i.e. if one hostname will be present twice - that particular server will get 2x times more load than the others.