Chapter 15. Configure Load Balancing-as-a-Service with the Networking LBaaSv2 API

Load Balancing-as-a-Service (LBaaS) enables OpenStack Networking to distribute incoming requests evenly between designated instances. This step-by-step guide configures OpenStack Networking to use LBaaS with the Open vSwitch (OVS) plug-in.

Introduced in Red Hat OpenStack Platform 5, Load Balancing-as-a-Service (LBaaS) enables OpenStack Networking to distribute incoming requests evenly between designated instances. This ensures the workload is shared predictably among instances, and allows more effective use of system resources. Incoming requests are distributed using one of these load balancing methods:

  • Round robin - Rotates requests evenly between multiple instances.
  • Source IP - Requests from a unique source IP address are consistently directed to the same instance.
  • Least connections - Allocates requests to the instance with the least number of active connections.

Table 15.1. LBaaS features

FeatureDescription

Monitors

LBaaS provides availability monitoring with the PING, TCP, HTTP and HTTPS GET methods. Monitors are implemented to determine whether pool members are available to handle requests.

Management

LBaaS is managed using a variety of tool sets. The REST API is available for programmatic administration and scripting. Users perform administrative management of load balancers through either the CLI (neutron) or the OpenStack dashboard.

Connection limits

Ingress traffic can be shaped with connection limits. This feature allows workload control and can also assist with mitigating DoS (Denial of Service) attacks.

Session persistence

LBaaS supports session persistence by ensuring incoming requests are routed to the same instance within a pool of multiple instances. LBaaS supports routing decisions based on cookies and source IP address.

Note

LBaaS is currently supported only with IPv4 addressing.

Note

LBaaSv1 has been removed in Red Hat OpenStack Platform 11 (Ocata) and replaced by LBaaSv2.

15.1. OpenStack Networking and LBaaS Topology

OpenStack Networking (neutron) services can be broadly classified into two categories.

1. - Neutron API server - This service runs the OpenStack Networking API server, which has the main responsibility of providing an API for end users and services to interact with OpenStack Networking. This server also has the responsibility of interacting with the underlying database to store and retrieve tenant network, router, and loadbalancer details, among others.

2. - Neutron Agents - These are the services that deliver various network functionality for OpenStack Networking.

  • neutron-dhcp-agent - manages DHCP IP addressing for tenant private networks.
  • neutron-l3-agent - facilitates layer 3 routing between tenant private networks, the external network, and others.
  • neutron-lbaasv2-agent - provisions the LBaaS routers created by tenants.
Note

The neutron-lbassv2-agent (with HAProxy) is deprecated. See Chapter 16, Load Balancing-as-a-Service (LBaaS) with Octavia for the preferred load-balancing reference implementation with Octavia.

The following diagram describes the flow of HTTPS traffic through to a pool member:

lbaas

15.1.1. Support Status of LBaaS

  • LBaaS v1 API was removed in version 10.
  • LBaaS v2 API was introduced in Red Hat OpenStack Platform 7, and is the only available LBaaS API as of version 10.
  • LBaaS deployment is not currently supported in Red Hat OpenStack Platform director.
Note

The neutron-lbassv2-agent (with HAProxy) is deprecated and no longer supported. See Chapter 16, Load Balancing-as-a-Service (LBaaS) with Octavia for the preferred load-balancing reference implementation with Octavia. The neutron-lbaas RPMs are still available to support the API for third-party plugin support.

15.1.2. Service Placement

The OpenStack Networking services can either run together on the same physical server, or on separate dedicated servers.

Note

Red Hat OpenStack Platform 11 added support for composable roles, allowing you to separate network services into a custom role. However, for simplicity, this guide assumes that a deployment uses the default controller role.

The server that runs API server is usually called the Controller node, whereas the server that runs the OpenStack Networking agents is called the Network node. An ideal production environment would separate these components to their own dedicated nodes for performance and scalability reasons, but a testing or PoC deployment might have them all running on the same node. This chapter covers both of these scenarios; the section under Controller node configuration need to be performed on the API server, whereas the section on Network node is performed on the server that runs the LBaaS agent.

Note

If both the Controller and Network roles are on the same physical node, then the steps must be performed on that server.