Creating and managing target group
  • PDF

Creating and managing target group

  • PDF

It is available in a VPC environment.

Create and manage a target group to add to Load Balancer.

Create target group

The following describes how to create a target group.

  1. Please connect to the NAVER Cloud Platform console.
  2. Click Services > Networking > Load Balancer menus, in that order.
  3. Click the Target Group menu.
  4. Click the [Create target group] button.
  5. When the target group creation page appears, proceed with the following steps in order.

1. Create target group

Enter the target group information to create, and then click the [Next] button.

loadbalancer-targetgroup-vpc_info_ko

  • Currently, only VPC Server is provided as a Target type.

  • VPC: Select a VPC that includes the target (server) to register.

  • Protocol: Select a protocol, depending on the target's role.

    • The Load Balancer type that can be connected varies, depending on the protocol selected. Load Balancer types by protocol are as follows.

      Protocol Load balancer
      TCP Network Load Balancer
      PROXY_TCP Network Load Balancer
      HTTP Application Load Balancer
      HTTPS Application Load Balancer
  • Port: Enter the port number that each target is serving (listen).

    • Deliver the traffic to the port entered.

2. Set health check

Set the target group's health check policy, and then click the [Next] button.

loadbalancer-targetgroup-vpc_healthcheck_ko

  • Protocol: Select a protocol where the target status can be checked.
    • Only TCP can be selected if the target group's protocol is TCP/PROXY_TCP. If it is HTTP/HTTPS, then either HTTP or HTTPS can be selected.
  • Port: Enter the port number where the target status can be checked.
    • If the status can be checked, then it doesn't need to match the port number entered during 1. Create target group.
  • 1. If HTTP or HTTPS protocol is selected in Create target group, then enter the URL Path and HTTP Method after checking the following items.
    • URL Method: Enter the URL path to check the target status.
    • HTTP Method: Enter the HTTP Method (HEAD/GET) to check the target status.
  • Health check cycle (second): Enter the health check cycle between 5 and 300 seconds.
  • Enter a threshold where the target's status will be changed.
    • Normal threshold: the number of health checks that an abnormal target must succeed in getting back into service
    • Failure threshold: the number of times the normal target fails and is turned into an abnormal state and excluded from load balancing target

3. Add target

loadbalancer-targetgroup-vpc_addtrg_ko

  1. In the All targets field, select a target to include in target group.
    • All targets mean that all servers within the VPC are targets.
  2. Click the [>] button to go to Target field.
    • Select a target to delete, and then click [<] to delete a target included in the Target field.
  3. Click the [Next] button.

4. View settings information

Click the target group's settings information, and then click the [Create target group] button.

Manage target group

The target group created can change settings, add/remove a target, change health check settings, or check the monitoring information as a graph.

Set target group

The following describes how to check the target group settings information and change the settings.

  1. From the NAVER Cloud Platform console, click the Services > Networking > Load Balancer menus, in that order.
  2. Click the Target Group menu.
  3. Select the target group to check or change the settings information, and then click the [Set target group] button.
  • The target group settings pop-up window appears, and the target group's settings information can be checked.
  1. Apply the changes, and then click the [OK] button.

    loadbalancer-targetgroup-vpc_setting_ko

    • Sticky session setting status, proxy protocol application status, and load balancing algorithm can be changed.
    • Sticky session is a feature to add the server's unique ID to the header and deliver next requests to the same server.
      • The checkbox is only activated if the target group's protocol is TCP/HTTP/HTTPS.
    • Proxy protocol is only activated if the target group's protocol is PROXY_TCP.
      • For more details about proxy protocol settings, refer to Proxy Protocol.
    • A load balancing algorithm can be selected among Round Robin/Least Connection/Source IP Hash.
      • If the target group's protocol is TCP, then Least Connection is excluded from options.
      • For more details about load balancing algorithm, refer to NAVER Cloud Platform portal's Service > Networking > Load Balancer or this guide's FAQ.

Set health check

The following describes how to check the health check policies set to the target group and change the settings.

  1. From the NAVER Cloud Platform console, click the Services > Networking > Load Balancer menus, in that order.

  2. Click the Target Group menu.

  3. Select the target group to set a health check policy, and then click the [Set health check] button.

    • The health check settings pop-up windows appears, and the health check policy can be checked.
  4. Apply the changes, and then click the [OK] button.

    loadbalancer-targetgroup-vpc_setting2_ko

    • For more details about each item for setting health check policies, refer to 2. Set health check.

Set target

The following describes how to check and add/delete the target included in the target group.

Note

Change the target of the target group added to a Load Balancer if you want to change the server applied to the Load Balancer.

  1. From the NAVER Cloud Platform console, click the Services > Networking > Load Balancer menus, in that order.

  2. Click the Target Group menu.

  3. Select the target group to set the target, and then click the [Set target] button.

    • The target settings pop-up window appears, and the target included in the target group can be checked.

      loadbalancer-targetgroup-vpc_setting3_ko

  4. Select a target to add in the All targets field, and then click the [>] button to add a target.

    • All server means all servers within the VPC are targets.
  5. Select a target to delete in Target field, and then click [<] to delete the target included.

  6. Click the [OK] button.

Check target status

The following describes how to check the target status.

  1. From the NAVER Cloud Platform console, click the Services > Networking > Load Balancer menus, in that order.
  2. Click the Target Group menu.
  3. Select the target group to check the target status, and then click the [Check target status] button.
    • The target status pop-up window appears, and the target status within the target group can be checked according to the set health check policy.

Target group monitoring

The collected information about available host count and unavailable host count can be checked as a graph, respectively.

Note

The collection cycle varies, depending on the selected period. Monitoring information collected by handling load balancing can be set up and checked from at least one minute to the recent one year.

The following describes how to check the target group's monitoring information.

  1. From the NAVER Cloud Platform console, click the Services > Networking > Load Balancer menus, in that order.
  2. Click the Target Group menu.
  3. Select the target group to monitor, and then click the [Monitoring] button.
    • The target group monitoring pop-up window appears, and the monitoring information can be checked as a graph.
    • Select the period to check the monitoring information collected for the selected period.
    • Click the [Refresh] button to refresh the graph viewed.
    • Click i_loadbalancer_enlargement to check the zoomed-in graph. Click the [X] button to download the collected monitoring information as an Excel file.

Delete target group

Note

If the target group is connected to Load Balancer, then the target group can't be deleted. Delete the Load Balancer first, and then delete the target group.

The following describes how to delete a target group.

  1. From the NAVER Cloud Platform console, click the Services > Networking > Load Balancer menus, in that order.
  2. Click the Target Group menu.
  3. Select the target group to delete, and then click the [Delete] button.
  4. Check the details in the target group deletion pop-up window, and then click the [Delete] button.
    • Selected target group is deleted.

Proxy Protocol

Proxy protocol is a protocol that can check the IP address (original client IP address) of a client that requests connection in proxy environment when using TCP or SSL protocol in Load Balancer.

The following describes how to check the protocol-specific client IP when setting the Load Balancer.

Protocol Method
HTTP, HTTPS X-Forwarded-For
TCP, SSL Proxy Protocol

If you choose to use proxy protocol when setting Load Balancer rules, then Load Balancer calls a request as follows.

PROXY_STRING + single space + INET_PROTOCOL + single space + CLIENT_IP + single space + PROXY_IP + single space + CLIENT_PORT + single space + PROXY_PORT + "\r\n“
```Shell PROXY TCP4 125.209.237.10 125.209.192.12 43321 80\r\n ```

Versions of Apache and NGINX that support proxy protocol are as follows.

  • Apache 2.2
  • Apache 2.4
  • NginX 1.11.12

Set proxy protocol

The following describes how to set the proxy protocol.

  1. When creating a Load Balancer, select either TCP or SSL protocol in 1. Create load balancer, and then click the Proxy Protocol checkbox to select.
  2. Check the following steps to set according to the version.

Apache 2.2

The following describes how to set the proxy protocol in Apache version 2.2.

$ wget --no-check-certificate https://raw.githubusercontent.com/ggrandes/apache22-modules/master/mod_myfixip.c
$ /{Path where Apache is installed}/bin/apxs -c -i mod_myfixip.c
  • Add the following settings to the /{Path where Apache is installed}/conf/httpd.conf file.

    LoadModule myfixip_module modules/mod_myfixip.so
    
    <IfModule mod_myfixip.c>
    RewriteIPResetHeader off
    Set to RewriteIPAllow 10.31.0.0/16 #LB IP range (for example, if LB IP is 125.209.197.92, use 125.209.0.0/16)
    </IfModule mod_myfixip.c>
    

Apache 2.4

The following describes how to set the proxy protocol in Apache version 2.4.

$ wget --no-check-certificate https://raw.githubusercontent.com/ggrandes/apache24-modules/master/mod_myfixip.c
$ /{Path where Apache is installed}/bin/apxs -c -i mod_myfixip.c
  • If the apxs path can't be found, then install the http-devel package and check.

  • Add the following settings to the /{Path where Apache is installed}/conf/httpd.conf file

    LoadModule myfixip_module modules/mod_myfixip.so
    
    <IfModule mod_myfixip.c>
    RewriteIPResetHeader off
    Set to RewriteIPAllow 10.31.0.0/16 #LB IP range (for example, if LB IP is 125.209.197.92, use 125.209.0.0/16)
    </IfModule mod_myfixip.c>
    

Nginx 1.11.12

The following describes how to set the proxy protocol in NGINX version 1.11.12.

  1. Check if the HTTP module is included in NGINX.
$ nginx -V 2>&1 | grep – 'http_realip_module'
  1. Add the following settings to the NGINX conf file.
http {
proxy_set_header X-Real-IP         $proxy_protocol_addr;
proxy_set_header X-Forwarded-For   $proxy_protocol_addr;
log_format main ' $proxy_protocol_addr - $remote_user [$time_local]'
#Adding to existing log format
                 '"$request" $status $body_bytes_sent'
                 '"$http_referer" "$http_user_agent"';
server
{ listen 80  proxy_protocol;
  set_real_ip_from LB IP range 1 (192.168.0.0/16);
  set_real_ip_from LB IP range 2 (192.168.0.0/16);
  real_ip_header proxy_protocol     }
}

Was this article helpful?