Appendix B. Sample lab: Deployments and workload balance 239
4. Click Create to create the route, as shown in Figure B-25.
Figure B-25   Creating a route 
Testing load balancing across NGINX instances
Complete the following steps:
1. Open a terminal window to the OCP machine with a user with root privileges. Use the ssh 
command or PuTTY from your local computer.
2. Run the script as shown in Example B-15 to test out the load balancing. The wget 
command uses a capital letter O:
$ for i in 1 2 3 4 5 6 7 8 9 10
do
wget -q http://app2-http-git/ -O index.test
grep App index.test
done
Example B-15   Running a script to test load balancing
$ for i in 1 2 3 4 5 6 7 8 9 10; do   wget -q http://app2-http-git/ -O 
index.test;  grep App2 index.test; done
App2a
App2b
App2a
App2b
App2a
App2b
App2a
App2b
App2a
App2b
From the command output, you can see that the route alternated between App2a and 
App2b at a rate of 50%.
3. Close the terminal window and log out of the OpenShift console.