How to test Load Balancing

With Jelastic you have a possibility to test the Load Balancing using different Load Testing tools. In this instruction we'll show you how to do this with a help of LoadUI.

  1. Create environment

    1. Log into the
      Jelastic Manager

    2. Click Create environment.

    3. In the Environment topology window choose two or more servers you want to use (for example, two instances of Apache). The NGINX balancer will be added automatically. Type the name of the environment and click Create.

  2. LoadUI Configurations

    1. Download, install and open LoadUI.

    2. Create a new Project by dragging the New Project icon to the project list.

    3. Expand the Runners category in the component toolbar by clicking the grey arrow next to it. Then add a Web Page Runner component by dragging the Web Page Runner icon to the project canvas.

    4. Enter the URL of your environment. To get it click Open in browser button for your environment and copy the URL from the address line.

    5. Click Run Once to make sure that loadUI can access the URL. This will send a single request to the target server. When the request is sent, the Requests counter in the black display is increased; when a response is received, the Completed counter increases.

    6. Add a Fixed Rate VU Generator to generate some load; do this by dragging the Fixed Rate icon to the canvas.

    7. Connect the two components by dragging the bottom connector of the Fixed Rate Generator to the top connector of the Web Page Runner component. You can change the load by clicking the left mouse button on the Rate knob of the Fixed Rate Generator and dragging. Dragging up will increase the rate and dragging down will decrease it.

    8. Highlight Fixed Rate Generator and Web Page Runner and make several clones of them.

  3. Checking the balancing

    1. Start running the Project by clicking on the Play button located near the top of the window.

    2. While the load test is running you will see the Requests counter increasing at a rate of that number of requests per second that you stated. Check how many requests your two Appache servers get during one minute. It can be about 5000 requests per minute.

    3. Go back to Jelastic dashboard. Click Change environment topology and add one or even more application servers.

    4. Start running the load test one more time.

    5. The sign that balancing is working will be the increased number of received requests. For example, four Apache servers can get about 7000 requests per minute.