Load balancer as a service OpenStack LbaaS
The following guide will show you how to deploy a LoadBalancer in Openstack with Neutron, but first, you should understand how it works, and what his components do.
A Load Balancer is composed of the following components:
Pool - A pool is a group of servers(members) who are designed to make
the same job, generally, a pool of web servers is used for balancing
traffic between the members of the pool. Here we will configure the
Load Balancing Method (ROUND_ROBIN,LEAST_CONNECTIONS,SOURCE_IP)
Members - Members are instances, a server, any aplication that you
can balance the load. They are assigned as pool members.
VIP - VIPs are Virtual IPs that logically represents the pool
members. It is the IP where the load will be balanced between
instances.
Healthmonitor - Healthmonitor will check if the members of a pool are
healthy, if an member is not working or the port/protocol monitored
is down, healthmonitor will send a message to the pool to not balance
the load to this member.
Now will create a Pool with 2 members, this Pool have a VIP and a Healthmonitor on it.
First we create a Pool
Next boot 2 instances in the same network
Assign both instances to the Pool
Then create a Healthmonitor and associate it to the Pool
Create a VIP to the Pool
Create a floating IP to the VIP
Associate the floating IP with the VIP port
Create security rules to allow HTTP, SSH and ICMP traffic
Login to both instances and run the command below to run a "webserver".
If we check with curl the VIP's floating IP, we'll see that in every connection one of both servers reply with his name.
Last updated
Was this helpful?