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: Creating Load-balancing service availability zones Creating load balancers in availability zones 13.1. Creating availability zones for the Load-balancing service 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 Gather the names of the Compute service AZs that you will use to name your Load-balancing service AZs. Important The names of the Load-balancing service AZ that you create must match the names of your Compute service AZs. Sample output Gather the IDs for the management networks that you will use to create your Load-balancing service AZs: Sample output Create an AZ profile. Repeat this step to create an AZ profile for each Load-balancing service AZ that you want to create: 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 ): 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 ): 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 ): 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 ): 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 ): 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 ): 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 Sample output Example - verify az-dcn1 Sample output Example - verify az-dcn2 Sample output steps Creating load balancers in availability zones Additional resources Creating network resources for Load-balancing service availability zones in the Deploying a Distributed Compute Node (DCN) architecture guide. loadbalancer availabilityzoneprofile create in the Command line interface reference loadbalancer availabilityzone create in the Command line interface reference 13.2. Creating load balancers in availability zones 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 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: 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 Sample output Additional resources Creating availability zones for the Load-balancing service loadbalancer in the Command line interface reference

Commands:
source ~/centralrc
openstack availability zone list --compute
+------------+-------------+ | Zone Name | Zone Status | +------------+-------------+ | az-central | available | | az-dcn1 | available | | az-dcn2 | available | | internal | available | +------------+-------------+
openstack network list -c Name -c ID
+--------------------------------------+--------------------------+ | ID | Name | +--------------------------------------+--------------------------+ | 10458d6b-e7c9-436f-92d9-711677c9d9fd | lb-mgmt-az-dcn2-net | | 662a94f5-51eb-4a4c-86c4-52dcbf471ef9 | lb-mgmt-net | | 6b97ef58-2a25-4ea5-931f-b7c07cd09474 | lb-mgmt-backbone-net | | 99f4215b-fad8-432d-8444-1f894154dc30 | heat_tempestconf_network | | a2884aaf-846c-4936-9982-3083f6a71d9b | lb-mgmt-az-dcn1-net | | d7f7de6c-0e84-49e2-9042-697fa85d2532 | public | | e887a9f9-15f7-4854-a797-033cedbfe5f3 | public2 | +--------------------------------------+--------------------------+
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_central --provider amphora --availability-zone-data '{"compute_zone": "az-central","management_network": "662a94f5-51eb-4a4c-86c4-52dcbf471ef9"}'
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-dcn2 --provider amphora --availability-zone-data '{"compute-zone": "az-dcn2","management-network": "10458d6b-e7c9-436f-92d9-711677c9d9fd"}'
openstack loadbalancer availabilityzone create --name az-central --availabilityzoneprofile az-profile-central --description "AZ for Headquarters" --enable
openstack loadbalancer availabilityzone create --name az-dcn1 --availabilityzoneprofile az-profile-az-dcn1 --description "AZ for South Region" --enable
openstack loadbalancer availabilityzone create --name az-dcn2 --availabilityzoneprofile az-profile-az-dcn2 --description "AZ for North Region" --enable
openstack loadbalancer availabilityzone show az-central
+------------------------------+--------------------------------------+ | Field | Value | +------------------------------+--------------------------------------+ | name | az-central | | availability_zone_profile_id | 5ed25d22-52a5-48ad-85ec-255910791623 | | enabled | True | | description | AZ for Headquarters | +------------------------------+--------------------------------------+
openstack loadbalancer availabilityzone show az-dcn1
+------------------------------+--------------------------------------+ | Field | Value | +------------------------------+--------------------------------------+ | name | az-dcn1 | | availability_zone_profile_id | e0995a82-8e67-4cea-b32c-256cd61f9cf3 | | enabled | True | | description | AZ for South Region | +------------------------------+--------------------------------------+
openstack loadbalancer availabilityzone show az-dcn2
+------------------------------+--------------------------------------+ | Field | Value | +------------------------------+--------------------------------------+ | name | az-dcn2 | | availability_zone_profile_id | 306a4725-7dac-4046-8f16-f2e668ee5a8d | | enabled | True | | description | AZ for North Region | +------------------------------+--------------------------------------+
source ~/centralrc
openstack loadbalancer create --name lb1 --vip-subnet-id public_subnet --availability-zone az-central
openstack loadbalancer show lb1
+---------------------+--------------------------------------+ | Field | Value | +---------------------+--------------------------------------+ | admin_state_up | True | | availability_zone | az-central | | created_at | 2023-07-12T16:35:05 | | description | | | flavor_id | None | | id | 85c7e567-a0a7-4fcb-af89-a0bbc9abe3aa | | listeners | | | name | lb1 | | operating_status | ONLINE | | pools | | | project_id | d303d3bda9b34d73926dc46f4d0cb4bc | | provider | amphora | | provisioning_status | ACTIVE | | updated_at | 2023-07-12T16:36:45 | | vip_address | 10.101.10.229 | | vip_network_id | d7f7de6c-0e84-49e2-9042-697fa85d2532 | | vip_port_id | 7f916764-d171-4317-9c86-a1750a54b16e | | vip_qos_policy_id | None | | vip_subnet_id | a421cbcf-c5db-4323-b7ab-1df20ee6acab | | tags | | +---------------------+--------------------------------------+