Testing load balancing
Now that the route has been created to the two NGINX web servers, you will test the load balancing capabilities of the OpenShift platform by demonstrating how traffic can be distributed across our two containerized web servers.
To test the load balancer distribution, we will create an automated script to create a bunch of requests. In this part of the demonstration, you will use the IBM Cloud Shell. If you are not familiar with IBM Cloud Shell, you can learn about it here.
- In the IBM Cloud Portal, with the demonstration account selected (2435442 - ITZ - Satellite), click the IBM Cloud Shell icon.
![]()
The IBM Cloud Shell will open in a new browser tab or window. It may take a few seconds for the shell to initialize.

- Create an shell environment variable with the Location URL you saved in the last section. At the Cloud Shell enter the following command substituting the "URL" with your Location URL.

- Copy and paste the script below into the IBM Cloud Shell and press enter.

Remember to substitute the Location URL with the one you recorded in the last step of Balancing network traffic. Take note of how the application routing is balanced equally (50:50) between nginx-server-1 and nginx-server-2 according to the route definition created earlier!
Record this!
Record the script's output. How many times is NGINX Server 1 works! and NGINX Server 2 works! printed to the screen?
You know have an application that is deployed across multiple servers and load balanced to distribute incoming requests between the deployed servers.