LBaaS is a Neutron extension that introduces a software Load Balancer, which balances network traffic between a group of multiple server instances.
This tutorial will show you how to create a Load Balancer with floating IP that balances traffic between two web servers on private network.
First of all we need to prepare our environment.
- private network (we use 10.1.1.0/24 in this tutorial)
- router with external network connectivity
- two web server instances
The following post-creation code automatically provisions an Apache web server with page containing server’s host name.
- mv /var/www/html/index.html /var/www/html/index.html.bak
- hostname > /var/www/html/index.html
Now we can create a pool of server for our Load Balancer.
We will add our servers to this pool.
To prevent Load Balancer from directing traffic to inactive instances we will add a monitor.
After that we can assign private network IP address to our Load Balancer.
And finally we have to assign a floating IP to make this Load Balancer reachable from Internet network:
This is how our new Load Balancer looks like.
If you have provisioned server instances with post-creation code from the top of this tutorial,
you can see host name switching on a web page at address of our Load Balancer depending on which
one of our servers handles the request.
Last modified: 0001-01-01