Network Load Balancer (NLB)
Network Load Balancer (NLB) is a Layer 4 load balancing service from Alibaba Cloud designed for the high-concurrency demands of the Internet of Things (IoT). It delivers ultra-high performance and automatic scaling, supporting up to 100 million concurrent connections per instance. NLB performance and usage limits
Prerequisites
Before you read this topic, you should be familiar with the following concepts:
Benefits
-
High performance
A single NLB instance supports ultra-high concurrent connections and massive bandwidth. It can handle sudden traffic bursts and high concurrency demands from industries such as internet services and artificial intelligence (AI).
-
Auto Scaling
You do not need to specify or manually adjust the specifications of an NLB instance. The instance's performance automatically scales as your business workloads fluctuate.
-
High availability
NLB uses a multi-layered architecture with features such as cluster-level disaster recovery, session persistence, and multi-zone active-active deployments to ensure high availability.
-
TCP SSL offloading
NLB supports large-scale TCP SSL offloading. You can centrally manage and offload SSL certificates on NLB instances to improve the processing efficiency of your backend servers.
-
Flexible traffic distribution
NLB supports IP-based backend servers and integrates with Cloud Enterprise Network (CEN) to distribute traffic across regions, VPCs, and on-premises data centers.
-
Advanced features
NLB supports various advanced features to meet diverse business requirements, including IPv4/IPv6 dual-stack networking, listening on port ranges, rate limiting for new connections, and connection draining.
Use cases
-
IoT service ingress
In Internet of Things (IoT) scenarios such as smart homes, smart parking, video surveillance, and the Internet of Vehicles (IoV), NLB serves as the service ingress, handling a massive number of concurrent connections. It also provides features such as TCP SSL offloading and connection rate limiting to ensure your IoT services run securely and stably.
-
Internet-facing cloud service ingress
NLB serves as an ingress for internet-facing traffic, where a single instance provides ultra-high Layer 4 processing capability. It automatically scales with business traffic, eliminating the need for manual intervention during fluctuations and reducing O&M costs.
-
Hybrid cloud service ingress
NLB supports adding servers from on-premises data centers as backend servers. You can use NLB with products such as Cloud Enterprise Network (CEN) to forward requests from the cloud to on-premises servers, enabling seamless communication for a hybrid cloud architecture.
NLB components
|
Term |
Description |
|
Instance |
An NLB instance provides Layer 4 load balancing. It distributes traffic across different backend servers to scale the service throughput of your applications. A single instance supports up to 100 million concurrent connections. |
|
Listener |
A listener is the smallest configurable unit of an NLB instance. You configure a protocol and port for a listener to specify the type of traffic for NLB to process, such as TCP traffic on port 80. NLB supports the TCP, UDP, and TCP SSL protocols. Each NLB instance must have at least one listener to start distributing traffic. For information about the maximum number of listeners that an NLB instance supports, see NLB quotas. |
|
Server group |
A server group is a logical group of backend servers that process requests distributed by an NLB. Server groups for an NLB are independent of an NLB, and you can attach the same server group to different NLBs. For the default maximum number of backend servers that can be added to a server group, see NLB Quotas. An NLB server group can contain Elastic Compute Service (ECS) instances, Elastic Container Instance (ECI) pods, Elastic Network Interface (ENI) cards, and IP-based backend servers. For more information, see: |
|
Health check |
NLB uses health checks to determine the availability of backend servers. NLB detects unhealthy servers in a server group and stops distributing traffic to them. NLB supports various health check settings, such as the protocol, port, and various thresholds. |
NLB instance types
This topic describes NLB types based on network type and protocol version. The following figure shows a dual-stack internet-facing NLB and a dual-stack internal-facing NLB.
Network type
Alibaba Cloud offers internet-facing and internal-facing NLB instances. You can choose an internet-facing or internal-facing NLB instance based on your business scenario. The system determines whether to use Internet Shared Bandwidth and an Elastic IP Address (EIP) based on your selection. In the preceding figure, the components in each semi-transparent box represent an internet-facing or internal-facing NLB instance.
|
Term |
Description |
|
Domain name |
A domain name that resolves to a virtual IP address (VIP) over the internet or a private network. You can also map a custom, human-readable domain name to the NLB domain name by using a CNAME record. Note
Starting from 00:00:00, November 15, 2024 (UTC+8), new NLB instances use a new domain name by default. You can no longer directly access instances by using the default domain name provided by the Alibaba Cloud platform. NLB instances created before this time are not affected. For more information, see ALB and NLB domain name upgrade. |
|
Internet Shared Bandwidth |
You need Internet Shared Bandwidth only when you create an internet-facing NLB instance. Internet Shared Bandwidth allows bandwidth to be shared and reused within a region. It supports multiple billing methods, such as pay-by-bandwidth and pay-by-enhanced-95th-percentile, to reduce public bandwidth costs. Internet-facing NLB instances use Internet Shared Bandwidth to provide pay-by-enhanced-95th-percentile and pay-by-bandwidth billing. |
|
EIP |
You need to use EIPs only when you create an internet-facing NLB. You do not need to configure EIPs when you create an internal-facing NLB. NLB uses EIPs as the service IP addresses for internet-facing services. An internet-facing NLB can have multiple EIPs. To achieve high availability, an internet-facing NLB should have at least two EIPs in different zones. |
|
VIP (Virtual IP address) |
The entity that NLB uses to distribute traffic. Each VIP is a private IP address in a Virtual Private Cloud (VPC). |
IP version
NLB instances are available in IPv4 and dual-stack versions.
|
Version |
Description |
|
IPv4 |
IPv4 instances provide IPv4 VIPs. |
|
Dual-stack |
Dual-stack instances provide both IPv4 and IPv6 VIPs. Each instance provides services through a single domain name. |
Activate Network Load Balancer (NLB)
Click Create Network Load Balancer to go to the NLB product purchase page.
Deploy and maintain NLB
After you register an Alibaba Cloud account, you can deploy and maintain NLB in the following ways:
-
Network Load Balancer (NLB) console: A web-based interface for interactive operations. You can log on to the console to create, use, or release NLB instances. For more information, see Create and manage NLB instances.
-
Alibaba Cloud SDK: Provides the SDK for multiple programming languages, such as Java, Go, and Python.
-
OpenAPI Explorer: allows you to quickly search for an API, call an API online, and dynamically generate SDK example code.
-
Alibaba Cloud app: A mobile management tool.
-
Terraform: An open source tool for provisioning and managing resources on Alibaba Cloud and other supported platforms through version-controlled configuration files.