This topic introduces data planning and resource preparation before configuring Network Load Balancer (NLB), as well as the configuration process.
Data planning
Region and AZ
Select the Region and availability zone based on the geographical location of the actual business.
- Region: It is recommended to select a region as close as possible to the geographical location of the client to reduce latency and improve download speed.
- Availability Zone: NLB supports active-active deployment across multiple availability zones by default. Select two or more availability zones within the same region to deploy NLB and improve overall service availability.
IP version
NLB supports instances with IPv4 and dual-stack IP protocols. Choose according to the business requirements.
- When only IPv4 is involved, select the IPv4 type.
- When dealing with IPv6 services, regardless of whether IPv4 services are involved, always select Dual-stack type.
Plan network type
NLB supports two types: public and private network. See the table below for appropriate selection.
tip
IPv4 instances only require IPv4 network planning, while dual-stack instances require both IPv4 and IPv6 network type planning.
Plan protocol type
NLB supports TCP and UDP protocol listeners. Choose according to your scenario.
- Applicable to scenarios that require high reliability and high data accuracy, and have relatively low speed requirements, such as file transmissions, email communications, and remote log-ins.
- UDP protocol: Applicable to scenarios that require high real-time performance but relatively low reliability, such as voice and video chats, gaming, and financial real-time market push notifications.
Planning instance Identity and Access Management (IAM)
Traffic entering the NLB instance is restricted by the security group associated with the NLB instance and the network ACL associated with the subnet of the NLB instance. You need to see Configurating instance access control to plan the outbound and inbound direction rules of the security group and Network ACL, so as to allow Client access traffic and Traffic verifying the availability of the NLB private IP address.
Resource preparation
Prepare the private cloud network environment
Create a Virtual Private Cloud (VPC) that meets business needs to provide a private network environment for the NLB.
- See Creating an IPv4 VPC to create a private network that supports only IPv4.
- See Creating an IPv6 VPC to create a private network that supports both IPv4 and IPv6.
Prepare backend servers
NLB supports three types of backend servers: Elastic Compute Service (ECS) instances, secondary network interfaces, and IP addresses. Please see the table below to select as needed.
Configuration procedures
- Create an NLB instance: Create an IPv4-type internet NLB instance.
- Create a Server Group and Add backend servers: Create an IPv4-type server group and add backend servers that provide actual services.
- Add a listener: Add a listener to the NLB instance and associate it with the server group.
- Configure the Security group and Network ACL: Allow the NLB traffic in the security group and Network ACL associated with the NLB instance and backend servers.
- Verification: Verify that the configured NLB can forward access requests to backend servers properly.
- Create an NLB instance: Create a private NLB instance with dual-stack support.
- CreateIPv4Server Group and Add backend servers: Create an IPv4-type server group and add backend servers that provide actual services.
- Add a listener: Add a listener to the NLB instance and associate it with the server group.
- Activate IPv6 Internet bandwidth: If IPv6 Internet services are needed, change the NLB instance's IPv6 network type into internet.
- Configure the Security group and Network ACL: Allow the NLB traffic in the security group and Network ACL associated with the NLB instance and backend servers.
- Verification: Verify that the configured NLB can forward access requests to backend servers properly.