Questo contenuto non è disponibile nella lingua selezionata.

Chapter 16. Configure Load Balancing-as-a-Service (LBaaS)


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 1: LBaaS features

Expand
Table 16.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 10 (Newton), and replaced with LBaaSv2.

16.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-lbaas-agent - provisions the LBaaS routers created by tenants.

16.1.1. Service Placement

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

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.

16.2. Configure LBaaS

This procedure configures OpenStack Networking to use LBaaS with the Open vSwitch (OVS) plug-in.

Note

By default, Red Hat OpenStack Platform includes support for the HAProxy namespace driver for LBaaS. You can review other supported service provider drivers at https://access.redhat.com/certification.

Perform these steps on nodes running the neutron-server service:

On the Controller node (API Server):

1. Enable LBaaS:

# yum install openstack-neutron-lbaas -y
Copy to Clipboard Toggle word wrap

2. Enable the HAProxy namespace driver using the service_provider parameter in the /etc/neutron/neutron_lbaas.conf file:

service_provider = LOADBALANCER:Haproxy:neutron_lbaas.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default
Copy to Clipboard Toggle word wrap

3. Enable the LBaaS plugin by setting the service_plugin value in the /etc/neutron/neutron.conf file:

service_plugins = lbaas
Copy to Clipboard Toggle word wrap

4. Apply the new settings by restarting the _neutron-server services.

# systemctl restart neutron-server.service
Copy to Clipboard Toggle word wrap

16.2.1. Enable LBaaSv1 Integration with Dashboard

Usually, the dashboard is installed on the same node where the neutron API service runs. You can enable Load Balancing in the Project section of the Dashboard user interface. Perform these steps on the node running the Dashboard (horizon) service:

1. Change the enable_lb option to True in the /etc/openstack-dashboard/local_settings file:

OPENSTACK_NEUTRON_NETWORK = {'enable_lb': True,
Copy to Clipboard Toggle word wrap

2. Apply the new settings by restarting the httpd service.

# systemctl restart httpd.service
Copy to Clipboard Toggle word wrap

You can now view the Load Balancer management options in the Network list in dashboard’s Project view.

16.3. On the network node (running the LBaaS Agent)

1. Enable the HAProxy load balancer in the /etc/neutron/lbaas_agent.ini file:

device_driver = neutron.services.loadbalancer.drivers.haproxy.namespace_driver.HaproxyNSDriver
Copy to Clipboard Toggle word wrap

2. Configure the user_group option in /etc/neutron/lbaas_agent.ini

user_group = haproxy
Copy to Clipboard Toggle word wrap

3. Select the required driver in the /etc/neutron/lbaas_agent.ini file:

interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
Copy to Clipboard Toggle word wrap

4. Apply the new settings by restarting the neutron-lbaas-agent service.

# systemctl restart neutron-lbaas-agent.service
Copy to Clipboard Toggle word wrap
Torna in cima
Red Hat logoGithubredditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi. Esplora i nostri ultimi aggiornamenti.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita il Blog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

Theme

© 2025 Red Hat