Server Load Balancer (SLB) is a service that distributes network traffic across groups of backend servers to increase the throughput of your applications. You can use SLB to prevent single points of failure (SPOFs) and improve the availability of applications. The SLB family includes the following load balancing services: Application Load Balancer (ALB), Network Load Balancer (NLB), and Classic Load Balancer (CLB). Choose a service based on your business requirements.
Product introduction
SLB is a fully managed load balancing service provided by Alibaba Cloud. It can be used out-of-the-box and provides elastic, stable, reliable, and high-throughput load balancing services. You can scale SLB resources based on traffic volumes and pay only for what you use. SLB is designed to balance the heavy loads of hyper-scale Internet applications. For example, you can use SLB to withstand traffic spikes during Double 11 and red envelope snatching or improve the availability of Internet of Things (IoT) applications that need to maintain a large number of concurrent connections. Compared with self-managed hardware load balancers, SLB can process a large number of user requests in scenarios such as Tmall Double 11 without the need for large upfront investments. Compared with self-managed open-source software load balancers, SLB is maintained 24/7 by an experienced and professional technical team. This ensures service stability and improves O&M efficiency.
SLB instance types
Alibaba Cloud provides the following types of SLB instances:
ALB: provides ultra-high Layer 7 processing capabilities, such as SSL offloading for HTTPS traffic. Each ALB instance supports up to one million queries per second (QPS). An ALB instance serves as a cloud-native gateway on Alibaba Cloud and provides advanced content-based routing features. ALB instances can forward, redirect, and rewrite requests based on user-defined HTTP headers, cookies, and query strings. For more information, see What is ALB?
NLB: designed to connect everything to the Internet. NLB is a Layer 4 load balancing service that offers ultra-high performance and can scale in response to network loads. An NLB instance supports up to 100 million concurrent connections, which is ideal for services that require high concurrency. NLB provides multiple advanced features to cater to services that need to process large numbers of client requests, highly concurrent message services, and audio and video services. For example, NLB can perform SSL offloading for TCP traffic, limit the number of new connections, and listen on multiple ports. In addition, NLB can offload Message Queuing Telemetry Transport Secure (MQTTS) encryption from servers that host your IoT services. NLB can also withstand traffic spikes by balancing the loads of IoT services. For more information, see What is NLB?
CLB: supports TCP, UDP, HTTP, and HTTPS. CLB provides advanced Layer 4 processing capabilities and basic Layer 7 processing capabilities. For more information, see What is CLB?
Functions and features
Item | ALB | NLB | CLB |
Service positioning |
|
|
|
Architecture and performance |
|
|
|
Forwarding capabilities |
|
|
|
Backend server type |
|
|
|
O&M capabilities |
|
|
|
Cloud-native support |
| Supports integration with Container Service for Kubernetes (ACK) and ACK Serverless (1.24 and later versions) | Must be used in combination with container services such as Container Service for Kubernetes (ACK) and Serverless Kubernetes (ASK) |
Common scenarios |
|
|
|
Billing
This section describes the billing methods and billable items of ALB, NLB, and CLB. We recommend that you view and learn about the billing methods and billable items of each service before you use the services.
ALB
For more information about the resource plans of ALB, see Introduction to ALB resource plans.
For more information about the billing rules of pay-as-you-go ALB instances, see ALB billing rules.
NLB
For more information about the billing rules of pay-as-you-go NLB instances, see NLB billing rules.
CLB
For more information about the billing rules of pay-as-you-go CLB instances, see Pay-as-you-go.
The following table compares the billing rules and usage calculations of Load Balancer Capacity Units (LCUs) of ALB, NLB, and CLB.
Service | LCU unit price (USD/LCU/hour) | LCU definition | References |
ALB | 0.007 | An ALB LCU provides the following resources:
| |
NLB | 0.005 | For TCP data transfer, an NLB LCU provides the following resources:
For UDP data transfer, an NLB LCU provides the following resources:
For SSL over TCP data transfer, an NLB LCU provides the following resources:
| |
CLB | 0.007 | For TCP data transfer, a CLB LCU provides the following resources:
For UDP data transfer, a CLB LCU provides the following resources:
For HTTP or HTTPS data transfer, a CLB LCU provides the following resources:
|
Benefits
Multiple protocols
Supports multiple protocols for a wide range of business scenarios.
Basic protocols: SLB supports Layer 4 load balancing over TCP or UDP and Layer 7 load balancing over HTTP or HTTPS.
Advanced protocols:
ALB supports the QUIC protocol. QUIC is an advanced protocol that ensures faster and safer transmission for audio, video, and mobile applications. ALB also supports Google Remote Procedure Call (gRPC) to implement more efficient service calls between microservices.
NLB supports SSL over TCP and can manage SSL certificates and offload SSL processing from backend servers. This improves the performance of backend servers.
Multi-level disaster recovery
Provides disaster recovery at multiple levels to ensure high availability.
Monitors the health status of backend servers on a regular basis. SLB does not distribute network traffic to unhealthy backend servers. This ensures the availability of your service.
Supports multi-zone deployment in specific regions to provide zone-disaster recovery.
Supports session synchronization. Backend servers are grouped into a cluster and sessions to these backend servers are synchronized to eliminate SPOFs. In addition, hot upgrades are also supported to prevent service disruptions.
Higher security and reliability
Provides built-in protection capabilities to reduce the costs of data security management.
Network layer security: Layer 4 SLB protects your service from DDoS, SYN flood, UDP flood, ACK flood, ICMP flood, and DNS flood attacks.
Application layer security: Layer 7 SLB protects your service from attacks at Layer 4 and Layer 7, and can be integrated with Web Application Firewall (WAF) to protect your service at the application layer.
Certificate management: SLB provides certificate management for HTTPS, QUIC, and SSL over TCP to ensure the stability and security of data transmission.
High performance
Ultra-high load balancing capabilities and multiple routing features ensure the performance of your services.
High performance: Alibaba Cloud offers a wide range of specifications for high-performance CLB instances to cater to various business requirements.
High elasticity: An ALB instance supports up to one million QPS. An NLB instance supports up to 100 million concurrent connections and 100 Gbit/s throughput. Both types of instances can process large numbers of client requests and scale along with your business.
Flexible scheduling
Supports multiple scheduling algorithms and forwarding methods to improve the flexibility of application deployment.
Supports multiple scheduling algorithms, such as weighted round-robin, weighted least connections, and consistent hashing based on source IP addresses, the combination of four elements, and QUIC IDs. You can select the most suitable scheduling algorithms based on your business requirements.
Supports inbound and outbound forwarding rules. SLB distributes network traffic across backend servers based on forwarding rules. This allows SLB to route network traffic to applications in a more flexible manner.
Flexible management and billing
Allows you to use multiple methods to manage your SLB service. You can specify the instance type and billing method based on your business requirements.
Flexible management: You can create, configure, and manage SLB instances in the SLB console, by calling API operations in OpenAPI Explorer, or by using Alibaba Cloud SDKs.
Flexible billing: SLB supports the subscription and pay-as-you-go billing methods, and the pay-by-data-transfer and pay-by-bandwidth metering methods.
References
For more information about ALB, NLB, and CLB, see the following topics:
For more information about how to get started with SLB, see Getting Started.
For more information about the pricing and billing of SLB, see SLB billing.