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.
- Create environment
- Log into the Jelastic Manager
- Click Create environment.
- 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.
- LoadUI Configurations
- Download, install and open LoadUI.
- Create a new Project by dragging the New Project icon to the project list.
- 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.
- 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.
- 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.
- Add a Fixed Rate VU Generator to generate some load; do this by dragging the Fixed Rate icon to the canvas.
- 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.
- Highlight Fixed Rate Generator and Web Page Runner and make several clones of them.
- Checking the balancing
- Start running the Project by clicking on the Play button located near the top of the window.
- 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.
- Go back to Jelastic dashboard. Click Change environment topology and add one or even more application servers.
- Start running the load test one more time.
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.