Load Balancer Sample App
Load Balancer Sample App is a simple application that helps you test your load balancer, it can be simply deployed on OpenScaler Platform in just a few steps.
Quickstart
Create Computer with Boot Script
Create a new computer and use the following script as boot script (under "advanced options").
This script will install a simple Flask application on the computer, and make it available on port 8080.
Note
If you want to install it on an existing computer, follow this guide instead.
Create Load Balancer
Create a new Load Balancer
Add Backend
Add a new backend to the Load Balancer and link it to the computers you created previously.
- use port
8080
for your backend
Optional
You can configure health check for your backend
- use the
/health
endpoint (and keep everything else default; e.g. status code200
etc.) - this is optional, but it's a good practice to ensure your backend is healthy
- you can also test
sticky session
and check that it always routes to the same server
Configure Frontend
Create a new frontend and select the backend created previously as "default backend"
Add a bind to any port you want (e.g. 80
), then click "Submit" (or "Apply Changes" if in edit mode).
Test Your App
Click on the address next to your port and you should see the demo app running.
Tip
Try refreshing the page a few times to see the load balancer in action.
Test Application Locally
To test the application locally
- On Linux:
You can now access your application at http://localhost:8080