Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning OpenStack Networking (Neutron), Second Edition

You're reading from   Learning OpenStack Networking (Neutron), Second Edition Wield the power of OpenStack Neutron networking to bring network infrastructure and capabilities to your cloud

Arrow left icon
Product type Paperback
Published in Nov 2015
Publisher Packt
ISBN-13 9781785287725
Length 462 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
James Denton James Denton
Author Profile Icon James Denton
James Denton
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Preface 1. Preparing the Network for OpenStack FREE CHAPTER 2. Installing OpenStack 3. Installing Neutron 4. Building a Virtual Switching Infrastructure 5. Creating Networks with Neutron 6. Managing Security Groups 7. Creating Standalone Routers with Neutron 8. Router Redundancy Using VRRP 9. Distributed Virtual Routers 10. Load Balancing Traffic to Instances 11. Firewall as a Service 12. Virtual Private Network as a Service A. Additional Neutron Commands B. Virtualizing the Environment Index

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:~$ sudo python -m SimpleHTTPServer 80
Serving HTTP on 0.0.0.0 port 80 ...

Repeat the mentioned commands for the second instance, substituting Web2 for Web1 in the index.html file.

Creating a pool

The first step to building a functional load balancer...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime