Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 13. Creating availability zones for load balancing network traffic at the edge
You can create load balancers in availability zones to increase traffic throughput and reduce latency by using the Red Hat OpenStack Platform (RHOSP) Load-balancing service (octavia).
The topics included in this section are:
13.1. Creating availability zones for the Load-balancing service Copier lienLien copié sur presse-papiers!
With the Red Hat OpenStack Platform (RHOSP) Load-balancing service (octavia), RHOSP administrators can create availability zones (AZs) that enable project users to create load balancers in a distributed compute node (DCN) environment to increase traffic throughput and reduce latency.
There are two steps required to create a Load-balancing service AZ: RHOSP administrators must first create an AZ profile, and then use the profile to create a Load-balancing service AZ that is visible to users.
An AZ profile must have the following:
- The name of the Compute service (nova) AZ.
The management network to use.
There are multiple management networks, one unique network for each AZ. The central AZ uses the existing load-balancing management network,
lb-mgmt-net
, and the additional AZs use their respective network,lb-mgmt-<AZ_name>-net
, for example,lb-mgmt-az-dcn1-net
,lb-mgmt-az-dcn2-net
, and so on.
Prerequisites
You must have a DCN environment in which the required networking resources have been created by running the
octavia-dcn-deployment.yaml
Ansible playbook.For more information, see Creating network resources for Load-balancing service availability zones in the Deploying a Distributed Compute Node (DCN) architecture guide.
- Your Load-balancing service provider driver must be amphora. The OVN provider driver does not support AZs.
-
You must be a RHOSP user with the
admin
role.
Procedure
Source your credentials file.
Example
source ~/centralrc
$ source ~/centralrc
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Gather the names of the Compute service AZs that you will use to name your Load-balancing service AZs.
ImportantThe names of the Load-balancing service AZ that you create must match the names of your Compute service AZs.
openstack availability zone list --compute
$ openstack availability zone list --compute
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Sample output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Gather the IDs for the management networks that you will use to create your Load-balancing service AZs:
openstack network list -c Name -c ID
$ openstack network list -c Name -c ID
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Sample output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create an AZ profile. Repeat this step to create an AZ profile for each Load-balancing service AZ that you want to create:
openstack loadbalancer availabilityzoneprofile create \ --name <AZ_profile_name> --provider amphora --availability-zone-data '{"compute_zone": "<compute_AZ_name>","management_network": "<lb_mgmt_AZ_net_UUID>"}'
$ openstack loadbalancer availabilityzoneprofile create \ --name <AZ_profile_name> --provider amphora --availability-zone-data '{"compute_zone": "<compute_AZ_name>","management_network": "<lb_mgmt_AZ_net_UUID>"}'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example - create profile for
az-central
In this example, an AZ profile (
az_profile_central
) is created that uses the management network (lb-mgmt-net
) on a Compute node that runs in the Compute AZ (az-central
):openstack loadbalancer availabilityzoneprofile create \ --name az_profile_central --provider amphora --availability-zone-data \ '{"compute_zone": "az-central","management_network": \ "662a94f5-51eb-4a4c-86c4-52dcbf471ef9"}'
$ openstack loadbalancer availabilityzoneprofile create \ --name az_profile_central --provider amphora --availability-zone-data \ '{"compute_zone": "az-central","management_network": \ "662a94f5-51eb-4a4c-86c4-52dcbf471ef9"}'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Repeat step 4 to create an AZ profile for each Load-balancing service AZ that you want to create.
Example - create profile for
az-dcn1
In this example, an AZ profile (
az-profile-dcn1
) is created that uses the management network (lb-mgmt-az-dcn1-net
) on a Compute node that runs in the Compute AZ (az-dcn1
):openstack loadbalancer availabilityzoneprofile create \ --name az-profile-dcn1 --provider amphora --availability-zone-data \ '{"compute-zone": "az-dcn1","management-network": \ "a2884aaf-846c-4936-9982-3083f6a71d9b"}'
$ openstack loadbalancer availabilityzoneprofile create \ --name az-profile-dcn1 --provider amphora --availability-zone-data \ '{"compute-zone": "az-dcn1","management-network": \ "a2884aaf-846c-4936-9982-3083f6a71d9b"}'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example - create profile for
az-dcn2
In this example, an AZ profile (
az-profile-dcn2
) is created that uses the management network (lb-mgmt-az-dcn2-net
) on a Compute node that runs in the Compute AZ (az-dcn2
):openstack loadbalancer availabilityzoneprofile create \ --name az-profile-dcn2 --provider amphora --availability-zone-data \ '{"compute-zone": "az-dcn2","management-network": \ "10458d6b-e7c9-436f-92d9-711677c9d9fd"}'
$ openstack loadbalancer availabilityzoneprofile create \ --name az-profile-dcn2 --provider amphora --availability-zone-data \ '{"compute-zone": "az-dcn2","management-network": \ "10458d6b-e7c9-436f-92d9-711677c9d9fd"}'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Using the AZ profile, create a Load-balancing service AZ. Repeat this step for any additional AZs, using the appropriate profile for each AZ.
Example - create AZ: az-central
In this example, a Load-balancing service AZ (
az-central
) is created by using the AZ profile (az-profile-central
):openstack loadbalancer availabilityzone create --name az-central \ --availabilityzoneprofile az-profile-central \ --description "AZ for Headquarters" --enable
$ openstack loadbalancer availabilityzone create --name az-central \ --availabilityzoneprofile az-profile-central \ --description "AZ for Headquarters" --enable
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example - create AZ: az-dcn1
In this example, a Load-balancing service AZ (
az-dcn1
) is created by using the AZ profile (az-profile-az-dcn1
):openstack loadbalancer availabilityzone create --name az-dcn1 \ --availabilityzoneprofile az-profile-az-dcn1 \ --description "AZ for South Region" --enable
$ openstack loadbalancer availabilityzone create --name az-dcn1 \ --availabilityzoneprofile az-profile-az-dcn1 \ --description "AZ for South Region" --enable
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example - create AZ: az-dcn2
In this example, a Load-balancing service AZ (
az-dcn2
) is created by using the AZ profile (az-profile-az-dcn2
):openstack loadbalancer availabilityzone create --name az-dcn2 \ --availabilityzoneprofile az-profile-az-dcn2 \ --description "AZ for North Region" --enable
$ openstack loadbalancer availabilityzone create --name az-dcn2 \ --availabilityzoneprofile az-profile-az-dcn2 \ --description "AZ for North Region" --enable
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Confirm that the AZ (
az-central
) was created. Repeat this step for any additional AZs, using the appropriate name for each AZ.Example - verify az-central
openstack loadbalancer availabilityzone show az-central
$ openstack loadbalancer availabilityzone show az-central
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Sample output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example - verify az-dcn1
openstack loadbalancer availabilityzone show az-dcn1
$ openstack loadbalancer availabilityzone show az-dcn1
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Sample output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example - verify az-dcn2
openstack loadbalancer availabilityzone show az-dcn2
$ openstack loadbalancer availabilityzone show az-dcn2
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Sample output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
13.2. Creating load balancers in availability zones Copier lienLien copié sur presse-papiers!
With the Red Hat OpenStack Platform (RHOSP) Load-balancing service (octavia), you can create load balancers in availability zones (AZs) in a distributed compute node (DCN) environment to increase traffic throughput and reduce latency.
Prerequisites
- You must have a Load-balancing service AZ provided by your RHOSP administrator.
- The virtual IP (VIP) network associated with the load balancer must be available in the AZ in which your load balancer is a member.
Procedure
Source your credentials file.
Example*
source ~/centralrc
$ source ~/centralrc
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To create a load balancer for a DCN environment, use the
loadbalancer create
command with the--availability-zone
option and specify the appropriate AZ.Example
For example, to create a non-terminated HTTPS load balancer (
lb1
) on a public subnet (public_subnet
) on availability zone (az-central
), you would enter the following command:openstack loadbalancer create --name lb1 --vip-subnet-id \ public_subnet --availability-zone az-central
$ openstack loadbalancer create --name lb1 --vip-subnet-id \ public_subnet --availability-zone az-central
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Continue to create your load balancer by adding a listener, pool, health monitor, and load balancer members.
Verification
Confirm that the load balancer (lb1) is a member of the availability zone (
az-central
).Example*
openstack loadbalancer show lb1
$ openstack loadbalancer show lb1
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Sample output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow