Building a load balancer

To demonstrate the creation and use of load balancers in Neutron, this next section is dedicated to building a functional load balancer based on the following scenario:

A tenant has a simple Neutron network set up with a router attached to both an external provider network and internal tenant network. The user would like to load balance HTTP traffic between two instances running a web server. Each instance is configured with an index.html page containing a unique server identifier.

To eliminate the installation and configuration of a web server for this example, you can mimic the behavior of one using the SimpleHTTPServer Python module on the instances, as follows:

ubuntu@web1:~$ echo "This is Web1" > ~/index.html ubuntu@web1:~$ ...

Get Learning OpenStack Networking (Neutron) - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.