Docs
ulb
Classic Load Balancer CLB
Purchase Guide
Product Selection
Load Balancer Type/Network Mode

Load Balancing Types/Network Modes

Load Balancing Types

Load Balancing TypesSupported Protocols
Request Proxy-basedHTTP, HTTPS, TCP
Packet Forwarding-basedTCP, UDP

Historically created instances are compatible types and can include VServer of both Request Proxy-based and Packet Forwarding-based load balancing.

The Difference Between TCP and HTTP in Request Proxy-based Load Balancing

TCP: Receives requests, selects backend nodes, connects to backend nodes, and forwards content. It can forward packets of other upper-layer protocols directly to backend service nodes.

HTTP: Receives requests, parses requests, selects the service node cluster based on forwarding rules, selects the backend service node based on the load balancing algorithm, connects to the service node, receives responses, parses response headers, adds appropriate response headers (such as Set-cookie, etc.), returns response content to the client.

The Difference Between TCP in Request Proxy-based and Packet Forwarding-based Load Balancing

Request Proxy-based: it needs to maintain two TCP connections, one from the client to the CLB and the other from the CLB to the backend service node (requires two TCP handshakes).

Packet forwarding-based: it only needs to parse and forward packets, reducing the overhead of connection establishment. The efficiency of packet forwarding is much higher than that of request proxy mode, but there are some limitations:

  • CLB will only modify the destination MAC address, does not support backend service nodes listening to different ports, inconsistent listening ports with service receiving ports will lead to data transmission errors.

  • The backend service node must configure the CLB service IP address.

If there is no need to listen to multiple ports on a single service node, you can choose the packet forwarding mode, which offers superior forwarding performance.

Network Modes

Public CLB

Public CLB, the IP address provided for external service is a public EIP, used to receive client requests from the Internet. If you need CLB to forward public requests, choose “Public” when creating CLB.

For EIP, you need to choose bandwidth, billing model and other attributes according to business requirements.

Private CLB

Private CLB, the IP address provided for external service is a private IP, used to receive client requests within the internal network. If you need CLB to forward internal requests, choose “Private” when creating CLB. The private IP address will be allocated from the selected subnet.

Suggestions for Selection

  • If your business does not need load balancing based on application layer information, and only need to listen to the service IP address and port, you can choose Packet Forwarding-based CLB.
  • If you have higher performance requirements, Packet Forwarding-based CLB is recommended.
  • If you need to perform load balancing based on application layer information such as URLs, domain names, etc., or require HTTP health probing, or require HTTPS SSL offloading, then Request Proxy-based CLB can be chosen.