A server group is a logical collection of backend servers. An Application Load Balancer (ALB) instance determines which server group will receive client requests based on your configured forwarding rules. Then, the ALB instance distributes requests to backend servers within the server group according to your configured load balancing algorithm. The backend servers receive and process the requests.
When creating a server group, you need to specify the server group type, which determines the types of backend servers that can be added.
ALB instances support two server group types: "server" and "IP". To use the IP type server group, please contact your customer manager or submit a ticket.
Server Group Type | Backend Server Type | Description |
|---|---|---|
Server | Backend servers can be one of the following two types:
| The ECS instances must be in the same VPC as the server group. |
IP | Backend servers can be IP addresses from the following private network segments:
| You can add IP addresses from the same VPC as the server group. When the "Remote IP" feature is enabled and network connectivity is ensured, you can also add IP addresses from different VPCs or from your on-premises IDC. |
When creating a server group, you need to specify the backend communication protocol and health check protocol. There are specific relationships between listener types, backend communication protocols, and health check protocols. For example, HTTP listeners support HTTP and HTTPS as backend communication protocols, and HTTP and TCP as health check protocols. See the table below for details.
Listener Type | Backend Communication Protocol | Health Check Protocol |
|---|---|---|
HTTP | HTTP, HTTPS | HTTP, TCP |
HTTPS | HTTP, HTTPS | HTTP, TCP |
HTTP/2 | HTTP, HTTPS, gRPC | HTTP, TCP |
QUIC | HTTP, HTTPS | HTTP, TCP |
The health check feature of ALB needs to be configured at the server group level. Health check is enabled by default for server groups. You can apply a health check template to a server group or customize the health check configuration.
When you enable health check for a server group, ALB periodically initiates health check requests to check the status of backend servers in the server group. When a backend server cannot properly respond to ALB's health check requests, traffic from clients will not be routed to that server. ALB will forward traffic to healthy backend servers. This approach ensures business continuity.
For more information about health check, refer to Health check.
The routing algorithm at the server group level is also known as the load balancing algorithm. The load balancing algorithm determines how client requests are distributed among backend servers. ALB supports the following load balancing algorithms:
ALB provides Cookie-based session persistence. When you enable this feature for a server group, ALB can forward requests from the same client to the same backend server based on Cookies.
For more information about session persistence, refer to Configure Cookie-based session persistence.
The "cross-zone load balancing" feature at the ALB instance level is enabled by default and cannot be disabled. Instance nodes in each availability zone simultaneously receive client requests. By default, instance nodes in one availability zone distribute received requests to backend servers in all availability zones where the ALB instance is located.
You can disable the "cross-zone load balancing" feature at the server group level. After this feature is disabled, an instance node will only distribute received requests to backend servers in the same availability zone.
For more information about the "cross-zone load balancing" feature, refer to Cross-zone load balancing.