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.

Create 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 can also configure Health Checks for the group.

  1. In the DCD, go to Menu > Management > Target Groups.

  2. Select + Create to create a new target group.

  1. To create a target group, fill in the following fields:

    • Name: Enter the name of the target group.

    • Algorithm: Select an algorithm from the drop-down list. The algorithm involves defining the conditions that determine how incoming traffic is distributed among the targets in the target group.

      • Round Robin: Allows equal distribution of requests among the servers with time. It distributes incoming network traffic or requests across servers in a circular, sequential order based on their weights.

      • Least connections: Allows the distribution of incoming network traffic or requests among a group of servers based on the current number of active connections. The server with the fewest active connections receives the next request.

      • Random: Allows the distribution of incoming requests randomly among the available servers.

      • Source IP: Allows IP address of incoming network requests to determine how to distribute the traffic among the available servers. This ensures that the same client IP address will always reach the same target.

    • Protocol: This field is preset and defines how data is transmitted between devices. The default value is set to HTTP.

Configure Connection Settings

  1. In the Connection tab, provide the following information:

    • 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. The default value is set to 2000 milliseconds (ms).

    • Retries: Enter the maximum number of attempts to reconnect to a target after a connection failure. The default value is set to 3.

Add Health Check

Note: This step is optional. For more information, see Health Checks.

  1. In the Connection 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: Select a method from the list of available health checks.

    • Match Type: Select 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:

      • Regular Expression: To provide flexibility in matching the expected response from a healthy server.

      • Negation: To negate an individual entry.

Add Targets

You need to register targets with the group so the ALB can forward traffic to the targets.

  1. In the Targets tab, select + Add to add a new target to the group.

  1. In Add Target, provide the following information:

    • 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 1 to 256. A target with a higher weight gets a larger share of traffic. The default weight value is set to 1.

    • Proxy Protocol: Select a value for the Proxy Protocol from the drop-down list to enable it. You can preserve and send the connection information to your backend instances, such as Apache, NGINX, or an ingress controller inside Kubernetes. Ensure your backend instances are up and running and have Proxy Protocol enabled. The backend instances may return errors or empty responses if the servers are not configured. The following options are available for the Proxy Protocol:

      • none: for disabling the Proxy Protocol

      • v1: for plain text format

      • v2: for binary format

      • v2ssl: for encrypted binary format

    • Options: For changing the target-specific health check configuration, select the following:

      • Health Check Enabled: Upon selection, the target becomes available only for TCP or HTTP connection attempts.

      • Maintenance Enabled: Upon selection, the target does not receive balanced traffic and affects the health of the target.

  1. Click Create to add the target.

Note: From the Targets list, select the edit icon to edit an existing target or select the delete icon to delete a target.

  1. Select 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