Create Target Groups
Before setting up an Application Load Balancer (ALB), predefine a target group to distribute the incoming traffic to the correct target. An IP address and a port are used to register a target.
A target group is a set of one or more registered targets and you can predefine targets in the Target Groups. You can create multiple target groups and reuse them to set up different ALB forwarding rules.
Creating a Target Group
A target group is a set of registered targets to which ALB distributes traffic. For each new group, set Connection details and add Targets. You may also configure Health Checks for the group.
Go to Management > Target Groups under Load Balancing.
Click + Create to create a new target group.
To create a target group, fill in the following fields:
Name: Enter a name for the target group.
Algorithm: Select an algorithm to determine how network traffic is distributed among targets.
Protocol: The default value is HTTP.
Configure Connection Settings
4. In the Connection tab, fill in the following fields for the connection settings:
Check Timeout: Enter the maximum wait time in milliseconds (ms) for a target in the group to respond to a check.
Check Interval: Enter the time in milliseconds (ms) between the end of the previous connection attempt and the start of the next.
Retries: Enter the maximum number of attempts to reconnect to a target after a connection failure.
Add Health Checks
Note: This step is optional. For more information, see Health Checks.
5. In the Connections tab, click Add Health Check to define the settings for a target group:
Path: Enter the destination URL for the HTTP health check request. The default value is set to /.
Method: Choose a method from the list of available health checks.
Match Type: Choose Status Code to indicate if the request was successful or not, or choose Response Body if you need to evaluate the content of the response body. You can further select the following checkboxes:
Regular Expression: To provide flexibility in matching the expected response from a healthy server.
Negation: To negate an individual entry.
Adding Targets
You must register targets with the group so the ALB can forward traffic to the targets.
6. In the Targets tab, click + Add to add a new target to the group and fill in the following fields:
IP: Enter the target IP directly, or choose one from the drop-down list.
Port: Enter the target port directly, or choose one from the drop-down list.
Weight: Assign a target weight from 0 to 256. A target with a higher weight gets a larger share of traffic. The default weight value is set to 1.
For changing the target-specific health check configuration, use the following checkboxes:
Health Check Enabled: On selecting, the target becomes available only for TCP or HTTP connection attempts.
Maintenance Enabled: On selecting, the target does not receive balanced traffic and affects the health of the target.
7. Click Create to add the target.
Info: From the Targets list, click to edit an existing target or click to delete a target.
8. Click Create to save all the configurations and to create the target group.
Result Your target group is added to the Target Groups list.
Last updated