Create a Load Balancer for Managing SBC Servers
If you would like to deploy a High Availability architecture for SBC Servers, you need to 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 SBC Servers in at least two Availability Zones.
Procedure
Create a target group
- Log in to Amazon EC2 Console.
- On the left navigation bar, go to Create target group. , click
- On the Specify group details page, complete the basic
configurations.
- Choose a target type: Select Instances.
- Target group name: Enter a name for the target group to help you identify it. In this example, enter ycm-cloudpbx.
- Protocol: In the drop-down list, select TCP.
- Port: Set the port value. In this example,
enter 23001.Note: Here the
23001
is just a test port, Yeastar will change the target group as needed when installing servers. - VPC: In the drop-down list, select the VPC
that you've created for the Cloud PBX. In this example, select
ycm-cloudpbx
.
- Click Next to register targets.
- In the Available instances, select all the SBC Server instances, then click Include as pending below.
- Click Create target group.
The new created target group is displayed in the Target groups list.
Create a load balancer
Now you can create a load balancer.
- Log in to Amazon EC2 Console.
- On the left navigation bar, go to .
- On the top of the page, click Create Load Balancer.
- On Load balancer types page, select Network Load Balancer, click Create.
- In Basic configuration section, complete the
following settings.
- Load balancer name: Enter a name for the load balancer to help you identify it. In this example, enter sbc-nlb.
- Scheme: Select Internet-facing.
- IP address type: Select IPv4.
- In Network mapping section, complete the following settings:
- VPC: In the drop-down list, select the VPC created for the Cloud PBX.
- Mappings: Select at least TWO
Availability Zones, then configure the related network
mappings.
- Subnet: In the drop-down list, select the subnet created for SBC Server.
- IPv4 settings: Assign an Elastic
IP address in each Availability Zone. Note: You can choose Use an Elastic IP address and then select an existing Elastic IP address, or let the Amazon AWS assign an IP address for your load balancer.
- In Listeners and routing section, set up the
listener.
- Protocol: Select TCP.
- Port: Set the port value to
23001
. - Default action: In the drop-down list, select the target group you've created.
- Click Create load balancer.
Delete the target group
After you successfully create a load balancer, we recommend that you delete the temporary target group, as Yeastar will create the required target group later when installing servers in you VPC.
- Go to
The detailed information of the load balancer is displayed on the bottom of the page.
, select the load balancer that you've created in the former
procedure. - Delete the listener of the load balancer.
- Under Listener tab, select the listener added when creating the load balancer, then click Delete.
- In the pop-up dialog box, click Yes, Delete.
- Go to
- Select the target group, then click .
- In the pop-up dialog box, click Yes, delete.
The target group is successfully deleted.
, delete the temporary target group.