Create a Load Balancer for Managing SBC Servers

To deploy a High Availability (HA) architecture for your SBC Servers, you must create a load balancer to monitor and manage the target servers.

Background information

In a High Availability architecture, a load balancer is necessary. It monitors the health of the registered SBC Servers, and routes traffic only to the healthy servers, greatly improving the system performance and availability.

When creating a load balancer, you need to configure a target group and register at least one target, the load balancer will route traffic to the target group.

The following diagram shows the architecture of the SBC Cluster after you create a load balancer.

Prerequisites

  • You have created public subnets for the load balancer nodes (SBC Servers) in at least two Availability Zones.
  • You have at least one Elastic IP address available for assignment.

Procedure

Create a target group

Before creating the load balancer, you must create the target groups that will route traffic to your SBC Servers.

  1. Log in to Amazon EC2 Console.
  2. On the left navigation pane, go to Load Balancing > Target Groups.
  3. At the top-right corner, click Create target group.

  4. Configure the following settings, and retain other defaults.

    • Target type: Select Instances.
    • Target group name: Enter a name to help you identify the target group. For example, sbc-tcp-80.
    • Protocol: In the drop-down list, select the target protocol. For example, TCP.
    • Port: Specify the target port number. For example, 80.
    • IP address type: Select IPv4.
    • VPC: In the drop-down list, select the VPC that you've created for the Cloud PBX. In this example, select ycm-cloudpbx.
  5. Click Next.
  6. In the Available instances, select all the SBC Server instances, then click Include as pending below.

  7. Click Next.
  8. In the Review and create page, review all settings and targets, then click Create target group.

    The new created target group is displayed in the Target groups list.

  9. Repeat Step 3 - 8 to create the remaining target groups required for SBC services, as listed below:
    Protocol Port
    TCP 80
    TCP 443
    TCP 5061
    TCP 9092
    TCP_UDP 5060
    TCP_UDP 11009
    UDP 8111

Create a load balancer

Now you can create a load balancer.

  1. Log in to Amazon EC2 Console.
  2. On the left navigation pane, go to Load Balancing > Load Balancer.
  3. At the top-right corner, click Create Load Balancer.

  4. On Load balancer types page, click Create in the Network Load Balancer.

  5. In Basic configuration section, complete the following settings.

    • Load balancer name: Enter a name for the load balancer to help you identify it. For example, sbc-nlb.
    • Scheme: Select Internet-facing.
    • Load balancer IP address type: Select IPv4.
  6. In the Network mapping section, complete the following settings:
    • VPC: In the drop-down list, select the VPC you have created for the Cloud PBX.
    • Availability Zones and subnets: Select at least TWO Availability Zones, then configure the related network settings.

      • Subnet: In each Availability Zone, select the corresponding public subnet created for SBC Servers.
      • IPv4 address: Assign an Elastic IP address in each Availability Zone.
        Important: To maintain a fixed public IP address, do NOT rely on auto-assigned IPs from AWS for both Availability Zones. You must manually assign an Elastic IP (using the Use an Elastic IP address option) in at least one Availability Zone.
  7. In the Security groups section, select the appropriate security groups for the load balancer.
  8. In the Listeners and routing section, add listeners for each of the target group you've created.
    1. Click Add Listener.
    2. Complete the following settings, and retain other defaults.
      • Protocol: Select the protocol used by the target group. For example, select TCP.
      • Port: Enter the port number defined for that target group. For example, enter 80.
      • Target group: In the drop-down list, select the target group that uses the same protocol and port.
  9. In the Summary section, review the load balancer configurations.

  10. Click Create load balancer.

    A load balancer is created successfully. You will be redirected to the load balancer’s details page, where you can visually review the listener mappings under the Resource map tab.

    Tip: The private IP address is not displayed on the load balancer's details page. If you need to retrieve it, navigate to Network & Security > Network Interfaces, then locate and check the Primary private IPv4 IP of the interface associated with your load balancer.