Updated on 2024-11-14 GMT+08:00

Using a Dedicated Load Balancer

If you are using a dedicated load balancer for the first time, you can start from this section.

ELB automatically distributes incoming traffic across multiple backend servers based on the routing policies you configure. It expands the service capabilities of your applications and improves their availability by eliminating single points of failure (SPOFs).

ELB Architecture

Figure 1 ELB architecture
Table 1 ELB components

Component

Description

Reference

Load balancer

Distributes incoming traffic across backend servers in one or more AZs.

Before using a load balancer, you need to add at least one listener to it.

Dedicated Load Balancer Overview

Listener

Works as the minimum service unit. It uses a protocol and port (for example, TCP port 80) you have specified to check requests from clients and route the requests to associated backend servers.

Each load balancer must have at least one listener to check and distribute traffic. You can add different types of listeners to distribute traffic using different protocols and ports.

Network listeners forward traffic to the default backend server group, while application listeners forward traffic based on the forwarding policies you configure.

Listener Overview

Forwarding policy

Determines how application load balancers distribute traffic across one or more backend server groups. Forwarding policies can be only configured for application listeners.

Application load balancers distribute Layer 7 requests more efficiently. They support various protocols and forwarding policies to suit your service needs.

Advanced Forwarding

Backend server group

Contains one or more backend servers to process requests distributed by load balancers.

A backend server group can be created independently. A backend server group can be associated with one or more load balancers.

Backend Server Group Overview

Backend server

Processes client requests. A backend server can be an ECS, BMS, supplementary network interface, or IP address. If a supplementary network interface or an IP address is added as a backend server, the server with the supplementary network interface attached or using the IP address processes client requests.

ELB periodically sends requests to backend servers to check whether they can process requests. This process is called health check. If a backend server is identified as unhealthy, the load balancer will stop routing requests to it.

Backend Server Overview

Procedure for Using a Dedicated Load Balancer

The following describes how to quickly create and use a dedicated load balancer.

Figure 2 Procedure for using a dedicated load balancer

Procedure

What to Do

Creating a Dedicated Load Balancer

Create a dedicated load balancer and be careful with the following configurations:

  • Basic information: type, billing mode, region, and AZ.
  • Specifications: elastic or fixed specifications; network or application load balancing, or both.
  • Network configuration: network type (private IPv4 or IPv6), VPC, and subnet planning.

Creating a Backend Server Group

Create a backend server group and add backend servers to the group for easier management and scheduling.

You can create a backend server group first and select it when creating a dedicated load balancer. Plan the backend protocol appropriately because the backend protocol of each backend server group must match the frontend protocol of the associated listeners.

Add listeners and choose the protocols and ports based on service requirements.

  • Application listeners (HTTP/HTTPS): work well for workloads that require high performance at Layer 7, such as real-time audio and video, interactive livestreaming, and game applications.
  • Networking listeners (TCP/UDP): are good for heavy-traffic and high-concurrency workloads at Layer 4, such as file transfer, instant messaging, and online video applications.

Advanced Forwarding

Add advanced forwarding policies to application listeners to forward traffic to specified backend server groups based on the domain name, path, HTTP request method, HTTP header, query string, and CIDR block.

Backend Server Group and Listener Protocols

You can associate a backend server group with different listeners or different dedicated load balancers under the same enterprise project.

The backend protocol of each backend server group must match the frontend protocol of the associated listeners as described in Table 2.

Table 2 The frontend and backend protocol

Load Balancer Specification

Frontend Protocol

Backend Protocol

Network load balancing

TCP

TCP

Network load balancing

UDP

  • UDP
  • QUIC

Application load balancing

HTTP

HTTP

Application load balancing

HTTPS

  • HTTP
  • HTTPS