Create and manage target group
Here’s how to create, view, modify, and manage target groups, including connecting listeners and setting up health checks.
Create target group
-
Go to KakaoCloud Console > Beyond Networking Service > Load Balancing > Target Group..
-
Click the [Create target group] button at the top right.
-
On the Step 1: Configure target group screen, enter the settings and click [Next].
Step 1 of creating target group
Category Item Description Load balancer Availability Zone Select from available AZs in the project Load balancer Provides a list of all load balancers in the selected availability zone Listener Provides a list of all Listeners for the selected load balancer, including an option to not select a Listener Basic information Name Target group name Protocol Target group protocol options based on listener protocol
- HTTP Listener:HTTP
,PROXY
- HTTPS Listener:HTTP
Algorithm - Round Robin
: Distributes traffic sequentially among targets in the target group
-Least connections
: Distributes traffic preferentially to the target with the fewest connections
-Source IP Hash
: Routes traffic from the same client IP to the same targetSticky session Can be enabled/disabled only for combinations of listener x target group in the following cases:
-HTTP x HTTP
,TCP x TCP
,UDP x UDP
- Otherwise: 'Disabled'Sticky session type Selectable types based on listener x target group combinations
-HTTP x HTTP
: HTTP Cookie, App Cookie
-TCP x TCP
: Source IP
-UDP x UDP
: Source IPSticky duration Activated only when using Sticky Sessions (HTTP Cookie, App Cookie)
- Integer between 1 and 604800 (default: 3600 seconds for HTTP Cookie, 360 seconds otherwise)Cookie name Activated only when using Sticky Sessions (App Cookie)
- App cookie must have a name (string) used by the user's application
- Allowed characters: Alphabets, numbers, some special characters (!
#
$
%
^
&
_
*
+
~
-
)
- Allowed length: 1-255 charactersSticky IP-netmask Activated only when using Sticky Sessions (Source IP)
- Enter in IPv4 address format only (default: 255.255.255.255)Health check Health check Enable or disable Type Selectable types based on target group protocol
- HTTP target group:HTTP
,PING
- PROXY target roup:PING
,TCP
HTTP method - Configurable only if HTTP
is selected as the health check type
- Choose fromCONNECT
,DELETE
,GET
,HEAD
,OPTIONS
,PATCH
,POST
,PUT
,TRACE
HTTP version - Configurable only if HTTP
is selected as the health check type
- Choose from1
or1.1
HTTP status code - Configurable only if HTTP
is selected as the health check type
- Single code, multiple codes separated by commas, or a range specified by a hyphen (-
)Check path Enter in URL format Check interval Integer between 1 and 3600 (default: 30 seconds).
- Only values greater than timeout can be setTimeout Integer between 1 and 900 (default: 4 seconds).
- Only values less than check interval can be setTransition criteria (success) Integer between 1 and 10 (default: 5 times) Transition criteria (failure) Integer between 1 and 10 (default: 2 times) infoIf the algorithm is
Source IP Hash
, traffic from a single source is routed to a specific target. In this case, sticky session settings are unnecessary and are disabled. It is recommended to useSource IP Hash
if you want to maintain fixed sessions as sticky session settings determine the duration. -
On the Step 2: Add targets screen, you can add resources as targets that are in the same AZ and VPC as the load balancer selected in Step 1.
-
Select the instances to add as targets and enter the port number.
-
Click the [Add target] button.
-
After completing target addition, click [Next].
-
On the Step 3: Review screen, review the information and click the [Create] button.
- After creating a target group, you need to set the target's security group. Go to Target Group > Target tab and check the Health check IP address and add the IP address to the security group inbound policy of the target.
- The IP address is used as a service port, so even if you do not use health check, you must open it through the inbound policy settings.
Manage target group
In the target group detail screen, you can modify or delete existing target groups or add new targets.
View target group list
-
Go to KakaoCloud Console > Beyond Networking Service > Load Balancing > Target Group..
-
Check the target group list.
Category Description Name Shows the name entered during creation and the ID assigned at creation Provisioning status Information on whether the target group was created successfully or is being modified or deleted Operating status Information on whether the created target group is in an operational state Protocol The protocol used to route traffic to the target Load balancer The name and ID of the load balancer connected to the target group VPC The name and ID of the VPC containing the load balancer [More] icon Provides functions such as rename, listener connection settings, algorithm settings, etc
View target group details
-
Go to KakaoCloud Console > Beyond Networking Service > Load Balancing > Target Group..
-
Select a target group.
-
In the detail screen, you can check detailed information, targets, health check, and attributes in each tab.
Target group details
Tab Description Details View detailed information of the target group Target Check the list of added targets and view detailed information of the targets Health check View health check settings information Attributes View attributes of the target group
Rename target group
-
Go to KakaoCloud Console > Beyond Networking Service > Load Balancing > Target Group..
-
Click the [More] icon > select Rename target group.
-
In the popup, change the name and click the [Modify] button.
Configure listener connection
-
Go to KakaoCloud Console > Beyond Networking Service > Load Balancing > Target Group..
-
Select the [More] icon and Configure listener connection.
-
In the popup, change the Listener connection settings and click the [Apply] button.
Set algorithm
-
Go to KakaoCloud Console > Beyond Networking Service > Load Balancing > Target Group..
-
Select the [More] icon amd [Set algorithm].
-
In the popup, change the algorithm and click the [Apply] button.
Configure target
-
Go to KakaoCloud Console > Beyond Networking Service > Load Balancing > Target Group..
-
Select the target group to change the target settings.
-
In the detail screen, click the Target tab and then click the [Configure target] button.
-
In the popup, check the registered targets, delete or add targets, and click the [Apply] button.
Set traffic weight
-
Go to KakaoCloud Console > Beyond Networking Service > Load Balancing > Target Group..
-
Select the target group to change the traffic weight settings.
-
In the detail screen, click the Target tab and then click the [Set traffic weight] button.
-
In the popup, change the weights and click the [Set] button.
- Traffic weight can be entered as integers ranging from
0
to256
. - Weights are converted to weighted values using the following formula.
- Weight Conversion: (weight/256)*100 (rounded to the nearest whole number)
- Ratio: converted weight / sum of converted weights
Set traffic weight
- Traffic weight can be entered as integers ranging from
Set health checks
-
Go to KakaoCloud Console > Beyond Networking Service > Load Balancing > Target Group..
-
Select the target group to change the health check settings.
-
In the detail screen, click the Health check tab and then click the [Configure health check] button.
-
In the popup, change the health check settings and click the [Apply] button.
Configure health check
Category Description Target group Current target group name Protocol Selectable types depending on the protocol of the target group
- HTTP target group:HTTP
,PING
- HTTPS target group:HTTPS
,PING
- TCP target group:PING
,TCP
- UDP target group:TCP
,HTTP
- PROXY target group:PING
,TCP
Health check Type: Health check type
-PING
: Sends a packet to the target and checks the response (ICMP Ping)
-HTTP
: Sends a packet to the specified path and checks the response
-HTTPS
: Checks the response in the same way as HTTP for a target using a certificate
-TCP
: Checks the status of the target using a TCP Protocol portInterval: Target health check interval (seconds)
- 1~3600 secondsTimeout: Maximum waiting time for a delayed response from the target (seconds)
- If the specified time is exceeded, the communication with the target is considered failed
- Set to a value less than the interval
- 1~900 secondsTransition criteria (success): Number of consecutive successful health checks required to consider a target healthy Transition criteria (failure): Number of consecutive failed health checks required to consider a target unhealthy and exclude it from traffic distribution -
When the health check type is
HTTP
orHTTPS
, additional attributes can be set.Category Description HTTP method Choose from GET
,HEAD
,OPTIONS
,POST
,PUT
,TRACE
,PATCH
,DELETE
,CONNECT
HTTP version Choose between 1.0 and 1.1 HTTP status code Set the expected status code that the target will respond to the load balancer
- If the target responds with the user-set HTTP status code, the health check is considered successful
- Single status code example:200
,201
- Multiple status codes example:201
,202
,401
,402
- Range example: 200-500Check path Enter the URL path for performing the health check -
Click the [Apply] button.
When the target of a target group uses the SELinux option provided by the latest CentOS distribution such as CentOS 8 Stream, PING
type health checks do not work because SELinux denies shell_exec_t calls
.
Configure sticky session
Sticky session can be set only for some target groups, depending on the listener and target group protocol.
Sticky session options by listener and target group protocol
Target Group\Listener | HTTP | HTTPS | TCP | UDP |
---|---|---|---|---|
HTTP | HTTP Cookie, App Cookie | X | X | X |
HTTPS | X | X | X | X |
TCP | X | X | Source IP | X |
UDP | X | X | X | Source IP |
PROXY | X | X | X | X |
-
Go to KakaoCloud Console > Beyond Networking Service > Load Balancing > Target Group..
-
Select the target group to change the sticky session settings.
-
In the detail screen, click the Attributes tab and then click the [Configure sticky session] button.
-
In the popup, change the settings and click the [Apply] button.
Delete target group
-
Go to KakaoCloud Console > Beyond Networking Service > Load Balancing > Target Group..
-
Select the [More] icon and Delete target group.
-
In the popup, enter the confirmation text and click the [Delete] button.
Manage target
You can view, modify, and delete targets added to the target group.
Two health check IPs are generated per subnet where the target is located. For health checks, communication must be allowed through these IPs. Please refer to View health check IPs and Allow health check IP communication to add an inbound policy to the security group.
View health check IP
-
Go to KakaoCloud Console > Beyond Networking Service > Load Balancing > Target Group..
-
Select a target group.
-
In the detail screen, select the Target tab.
-
Click the Health check IP per subnet to view the list of health check IPs.
Allow health check IP communication
There are two methods to configure the security group to allow health check IP communication. Choose one of the following methods based on your preference to allow communication.
First, register an inbound policy allowing the IP in the existing security group of the target instance
-
Go to KakaoCloud Console > Beyond Networking Service > Load Balancing > Target Group..
-
View the health check IP and select the target group to allow communication.
-
Select the Target tab.
-
Click on Health check IP by subnet to view the health check IP list. Keep the health check IP query screen open or copy the list.
-
In the Target list at the bottom, check the instance to allow communication with the health check IP and click the security group name.
- If there are multiple connected security groups, select any one to register.
- If the same policy has already been added to one or more of the connected security groups, it means that communication is already allowed.
-
Click the [Manage inbound rules] button in the Inbound rules tab.
-
In the popup, click the [Add] button.
-
Based on the detailed information from Step 5 in the Target Group > Target Tab, enter the policy information and click the [Apply] button on the right.
Inbound policy configuration
Field Description Protocol Protocol for communication (TCP, UDP, ICMP, ALL), select based on the health check type of the target group
- If the health check type is PING:ICMP
- If the health check type is HTTP, HTTPS, TCP:TCP
Packet source Source IP to allow access
- Enter the health check IP identified in the target details
- Register each of the two health check IPs generated in the Subnet that includes the targetPort Port for communication
- Enter the monitoring port of the targetPolicy description (Optional) Description of the policy -
Click the [Close] button.
Second, create a new security group for health check and attach it to the target instance
-
Go to KakaoCloud Console > Beyond Networking Service > Load Balancing > Target Group..
-
View the health check IP and select the target group to allow communication.
-
Select the Target tab in the detail view.
-
Click on Health check IP per subnet and copy the health check IP.
-
Refer to Create security group to go and create a new security group.
-
In the popup, enter the security group name and description, and add the inbound policy.
-
Based on the detailed information from Step 3 in the Target Group > Target tab , enter all policy information.
- Register all health check IPs in one security group and connect the entire target instance to this security group.
Or, create security groups by subnet and register only the health check IP generated in that Subnet, then connect only the target Instances in the same Subnet.
Inbound policy configuration
Field Description Protocol Protocol for communication (TCP, UDP, ICMP, ALL), select based on the health check type of the target group
- If the health check type is PING:ICMP
- If the health check type is HTTP, HTTPS, TCP:TCP
Packet source Source IP to allow access
- Enter the health check IP identified in the target details
- Register each of the two health check IPs generated in the Subnet that includes the target
- If managing with a single security group, register each of the entire health check IPsPort Port for communication
- Enter the monitoring port of the target
- Can be entered as a single port or a rangePolicy description (Optional) Description of the policy - Register all health check IPs in one security group and connect the entire target instance to this security group.
-
Click the [Create] button to complete the creation of the security group.
-
In the Security group list, click the [More] icon > [Modify association] button to connect the target instance.
View target
-
Go to KakaoCloud Console > Beyond Networking Service > Load Balancing > Target Group..
-
Go to the Target Group tab > Target tab.
-
Check the list of targets added to the target group.
Field Description IP Target IP Port Target port Provisioning status Information on whether the target was added successfully or if it is in the process of modification or deletion Operating status Information on whether the added target is available Instance Name and ID of the target instance Subnet Name of the subnet containing the target Security group security group connected to the target instance Monitoring port Port where health check is performed Weight Weight ratio calculated based on the input weight [More] icon Provides functions for setting the monitoring port and disconnecting the target
Modify target
The port of the added target cannot be modified. If you want to change the port, delete the target and configure target again.
Set monitoring port
-
Go to KakaoCloud Console > Beyond Networking Service > Load Balancing > Target Group..
-
Go to the Target Group tab and select a specific target group.
-
Select the Target tab in the detail view.
-
Check the list of targets added to the target group.
-
Select the [More] icon > [Set monitoring port].
-
In the popup, change the information.
- Set to the same port as the target port: The traffic port and monitoring port are the same
- Set to different port from the target port: The traffic port and monitoring port are different, so enter the monitoring port
-
Click the [Apply] button.
Detach target
-
Go to KakaoCloud Console > Beyond Networking Service > Load Balancing > Target Group..
-
Go to the Target Group tab and select a specific target group to disconnect the target.
-
Select the Target tab in the detail view.
-
Check the list of targets added to the target group.
-
Select the [More] icon amd [Detach target].
-
In the popup, click the [Detach] button.
Detaching the target will not delete the instance. To reconnect, please configure the target again.