Server Load Balancer (SLB) is a service that distributes incoming traffic across backend server groups to increase the throughput of your applications. SLB can also be used to eliminate single points of failure (SPOFs) and improve the availability of applications.

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 along with the changes to your business 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 handle traffic spikes during large-scale online promotions or improve the availability of Internet of Things (IoT) applications that receive a great number of concurrent connections. Compared with self-managed hardware load balancers, SLB can handle a great number of user requests in scenarios such as large-scale promotional events without the need for large upfront investments. Compared with self-managed, open source software load balancers, SLB is maintained around the clock by an experienced and professional technical team. This ensures service stability and improves O&M efficiency.

SLB instance types

SLB
Alibaba Cloud provides the following types of SLB instances:
  • Application Load Balancer (ALB): provides ultra-high Layer 7 processing capabilities such as SSL offloading for HTTPS traffic. Each ALB instance can serve 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 messages based on user-defined HTTP headers, cookies, and query strings. For more information, see What is ALB?
  • Network Load Balancer (NLB): designed to connect all things to the Internet. NLB is a Layer 4 load balancing service that offers ultra-high performance and can scale in response to network load. An NLB instance serves up to 100 million concurrent connections, which is suitable for services that require high concurrency. NLB provides multiple advanced features to cater to services that need to handle massive volumes of client requests, highly concurrent message services, and audio and video services. For example, NLB can offload SSL for TCP traffic, limit the number of new connections, and listen on all ports. In addition, NLB can also offload Message Queuing Telemetry Transport Secure (MQTTS) encryption from servers that host your IoT services. For more information, see What is NLB?
  • Classic Load Balancer (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?

Features

Feature ALB NLB CLB
Service scope
  • Ultra-high Layer 7 processing capabilities and advanced routing features
  • Intended for protocols at the application layer, such as HTTP, HTTPS, and Quick UDP Internet Connections (QUIC)
  • Application-oriented
  • Ultra-high Layer 4 processing capabilities and large-scale SSL offloading capabilities
  • Intended for TCP, UDP, and SSL over TCP protocols
  • Network-oriented
  • Powerful Layer 4 and Layer 7 processing capabilities
  • Intended for TCP, UDP, HTTP, and HTTPS protocols
Architecture and performance
  • Developed on top of the network function virtualization (NFV) platform and supports auto scaling
  • Up to one million QPS per instance
  • Developed on top of the NFV platform instead of physical machines and supports fast and automatic scaling
  • Up to 100 million concurrent connections per instance
  • Developed on top of an architecture of physical machines
  • Up to one million concurrent connections and 50,000 QPS per instance
Forwarding capabilities
  • Provides multiple Layer 7 features and content-based routing
  • Supports HTTP rewrites, redirects, overwrites, and throttling
  • Provides advanced Layer 4 capabilities and SSL offloading for TCP traffic
  • Supports features such as throttling in case of traffic spikes, connection draining, and listening by port range
  • Provides basic Layer 4 and Layer 7 load balancing capabilities
  • Supports only domain name-based and URL-based forwarding
Backend server type
  • Elastic Compute Service (ECS) instances
  • Elastic network interfaces (ENIs)
  • Elastic container instances
  • IP addresses
  • Functions in Function Compute
  • ECS instances
  • ENIs
  • Elastic container instances
  • IP addresses
  • ECS instances
  • ENIs
  • Elastic container instances
O&M capabilities
  • Automatically scales along with your business without manual configurations
  • Automatically scales along with your business without manual configurations
  • Requires specification management for pay-by-specification instances
  • Requires an estimate of traffic spikes
Cloud-native support
  • Serves as a cloud-native gateway
  • Supports traffic splitting, mirroring, canary releases, and blue-green deployments
Supports integrating with Container Service for Kubernetes (ACK) and Serverless Kubernetes (ASK) of 1.24 and later versions Must be used in combination with container services such as ACK and ASK
Scenarios
  • Supports high-performance automatic scaling for Internet applications at Layer 7
  • Maintains low network latency for audio and video applications in high traffic scenarios
  • Supports canary releases and blue-green deployments for cloud-native applications
  • Supports high concurrency to withstand Layer 4 traffic spikes
  • Serves as an ingress for IoT services such as Internet of vehicles (IoV)
  • Supports cross-zone disaster recovery and serves as an ingress and egress for both on-premises and cloud services
  • Ensures high reliability when CLB distributes requests to websites and systems at Layer 4
  • Supports high concurrency and ensures high performance in traffic distribution
  • Supports zone-disaster recovery and cross-region disaster recovery

Billing

The following section describes the billing methods and billable items of ALB, NLB, and CLB.

ALB

Billable items of ALB

For more information about the pricing rules of pay-as-you-go ALB instances, see ALB billing rules.

NLB

Billable items of NLB

For more information about the pricing rules of pay-as-you-go NLB instances, see NLB billable items.

CLB

Billable items of CLB

For more information about the pricing rules of pay-as-you-go CLB instances, see Pay-as-you-go.

The following table compares the pricing rules and usage calculations of Load Balancer Capacity Units (LCUs) of ALB, NLB, and CLB.
Instance type Price per LCU

(Unit: USD/hour/transit router)

LCU definition Reference
ALB 0.007 An ALB LCU provides resources for:
  • 25 new connections per second
  • 3,000 concurrent connections (sampled every minute)
  • 1 GB of data transfer processed per hour
  • 1,000 rules processed per hour
    Note The rules include forwarding rules, lines of code in AScript, and additional certificates. These three items have the same free-of-charge quota, which is 25.
ALB billing rules
NLB 0.005
For TCP data transfer, an NLB LCU provides resources for:
  • 800 new connections per second
  • 100,000 concurrent connections (sampled every minute)
  • 1 GB of data transfer processed per hour
For UDP data transfer, an NLB LCU provides resources for:
  • 400 new connections per second
  • 50,000 concurrent connections (sampled every minute)
  • 1 GB of data transfer processed per hour
For SSL over TCP data transfer, an NLB LCU provides resources for:
  • 50 new connections per second
  • 3,000 concurrent connections (sampled every minute)
  • 1 GB of data transfer processed per hour
NLB billing rules
CLB 0.007
For TCP data transfer, a CLB LCU provides resources for:
  • 800 new connections per second
  • 100,000 concurrent connections (sampled every minute)
  • 1 GB of data transfer processed per hour
For UDP data transfer, a CLB LCU provides resources for:
  • 400 new connections per second
  • 50,000 concurrent connections (sampled every minute)
  • 1 GB of data transfer processed per hour
For HTTP or HTTPS data transfer, a CLB LCU provides resources for:
  • 25 new connections per second
  • 3,000 concurrent connections (sampled every minute)
  • 1 GB of data transfer processed per hour
  • 1,000 rules processed per hour
    Note The rules are forwarding rules. The free-of-charge quota of forwarding rules is 25.
Specification fee and LCU fee

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. In addition, 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, 100 Gbit/s throughput, and one million QPS. Both types of instances can handle massive amounts 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 configuring 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 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.