Create and manage target groups
    • PDF

    Create and manage target groups

    • PDF

    Article Summary

    Available in VPC

    You can use Target Groups to distribute requests to one or more registered targets. That is, they are a set of targets (servers) to process requests, which can be used within the Load Balancer service. When creating a listener for the Load Balancer, you are required to specify a Target Group for an action. The Load Balancer distributes the traffic based on the conditions.

    • Target Groups perform defined health checks for the registered targets. They check the status at the L4 or L7 level according to the protocol of the target performing the service.
    • You can register all targets (servers) within the same VPC regardless of zone or subnet in the Target Group.
    • A Target Group is reusable into additional listeners connected to same Load Balancer, but it cannot be connected to multiple load balancers.

    Create target group

    To create a target group, follow these steps:

    1. Access NAVER Cloud Platform console.
    2. Click Services > Networking > Load Balancer, in order.
    3. Click the Target Group menu.
    4. Click the [Create Target Group] button.
    5. When the Create Target Group screen appears, proceed with the following steps in order:

    1. Create target group

    Enter the information for the Target Group you wish to create and click the [Next] button.

    • Target type : select between the general VPC server and transit VPC server

    • VPC: select the VPC that the Target (server) is included in.

    • Protocol: select the protocol depending on the Target's role.

      • The Load Balancer type varies by the selected protocol. The Load Balancer types for each protocol are the following:

        ProtocolLoad Balancer
        TCP, UDPNetwork Load Balancer
        PROXY_TCPNetwork Proxy Load Balancer
        HTTP, HTTPSApplication Load Balancer
        IPInline Load Balancer
    • Port: enter the port number that each Target is listening (in service).

      • Forward the traffic to the port entered.
      • If you select the transit VPC server type, this option is disabled.

    2. Set health check

    Set up the health check policy of the Target Group and click the [Next] button.

    • Protocol: select the protocol that can check the Target’s status.
      • You can only select TCP if the Target Group’s protocol is TCP/PROXY_TCP/IP. If it is HTTP/HTTPS, you can select either HTTP or HTTPS.
    • Port: enter the port number to use to check the Target’s status.
      • As long as you can view the status, it does not have to match the port number you entered for 1. Create Target Group.
    • If you select HTTP or HTTPS protocol during 1. Create Target Group, please enter the URL Path and HTTP Method by referring to the following:
      • URL Method: enter the URL address to use to check the Target’s status.
      • HTTP Method: select the HTTP Method (HEAD/GET) to use to check Target's status.
    • Health Check cycle (sec): enter the Health Check cycle between 5-300 seconds.
    • Enter a threshold where the Target's status will be changed.
      • Normal threshold: the number of status check times the abnormal Target must succeed to be put back into service
      • Failure threshold: the number of times the normal Target must fail to be changed as abnormal and be excluded from the load distribution Target

    3. Add Target

    1. Select the target to include in the Target Group from the All Target field.
      • All Target is for all servers in VPC.
      • For Target Groups of the transit VPC server type, only the servers created with 3rd party images are visible.
    2. Click the [>] button to move to Applied Target field.
      • To remove a server included in the Applied Target field, select the target to eliminate and click [<].
    3. Click the [Next] button.

    4. View setting information

    Check the setting information for Target Group and click the [Create Target Group] button.

    Manage target groups

    Target group created can change settings, add/remove a Target, change Health Check settings, or check the monitoring information as a graph.

    Target group settings

    To check the Target Group settings information and change the settings, follow these steps:

    1. Click Services > Networking > Load Balancer in order on the NAVER Cloud Platform console.
    2. Click the Target Group menu.
    3. Select the Target Group to check or change the setting information and click the [Change Target Group settings] button.
    • The Change Target Group settings popup window appears and you can view the setting information of the Target Group.
    1. After applying changes, click the [OK] button.
      • You can change the Sticky Session status, Proxy Protocol application status and Load Balancing algorithm.
      • Sticky Session is a feature that forwards to the same server for next requests by adding a unique server ID to headers.
        • The check box is only activated when the Target Group’s protocol is TCP/UDP/HTTP/HTTPS.
      • Proxy Protocol is only activated when the Target Group’s protocol is PROXY_TCP.
        • For more information about Proxy Protocol settings, see Proxy Protocol.
      • For the Load Balancing algorithm, you can choose either Round Robin/Least Connection/Source Ip Hash.
        • If the Target Group’s protocol is TCP, UDP, or IP, Least Connection is excluded from the options.
        • For more information about Load Balancing algorithm, see Service > Networking > Load Balancer from NAVER Cloud Platform portal or check the FAQs of this guide.

    Set health check

    To check the Health Check policies set to the Target Group and change the settings, follow these steps:

    1. Click Services > Networking > Load Balancer in order on the NAVER Cloud Platform console.
    2. Click the Target Group menu.
    3. Select a Target Group to establish the Health Check policy in and click the [Health Check setting] button.
      • The Health Check setting popup window pops up and you can view the Health Check policies.
    4. After applying changes, click the [OK] button.
      • For the detailed information about each item of the Health Check policy setting, see 2. Set Health Check.

    Target setting

    To check and add/delete the Target included in the Target Group, follow these steps:

    Note

    If you wish to change the servers applied to Load Balancers, please change the Target of the Target Group added to the Load Balancer.

    1. Click Services > Networking > Load Balancer in order on the NAVER Cloud Platform console.
    2. Click the Target Group menu.
    3. Select the Target Group to set a Target in and click the [Target Setting] button.
      • The Target setting popup window appears and you can view the Targets included in the Target Group.
    4. To add a Target, select a Target to add from the All Target and click the [>] button.
      • All server is for all servers in VPC.
      • For Target Groups of the transit VPC server type, only the servers created with 3rd party images are visible.
    5. To delete an included Target, select a Target to delete from the Applied Targets and click the [<] button.
    6. Click the [OK] button.

    Check target status

    To check the Target status, follow these steps:

    1. Click Services > Networking > Load Balancer in order on the NAVER Cloud Platform console.
    2. Click the Target Group menu.
    3. Select the Target Group to set a Target in and click the [View Target status] button.
      • The View Target status popup window pops up and you can check the status of the Targets included in the Target Group according to the Health Check policy.

    Monitor target group

    You can check the information for Available Host Count and Unavailable Host Count collected for a period of time each as a graph.

    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 1 minute to last year.

    Aggregation cycle (Interval)Search Period
    1-minute cycleUp to 6 hours
    5-minute cycleUp to 1 day
    30-minute cycleUp to 1 week
    2-hour cycleUp to 1 month
    1-day cycle1 month exceeded

    To check the Target Group's monitoring information, follow these steps:

    1. Click Services > Networking > Load Balancer in order on the NAVER Cloud Platform console.
    2. Click the Target Group menu.
    3. Select a Target Group to monitor and click the [Monitoring] button.
      • The Target Group Monitoring popup window pops up and shows the monitoring information as graphs.
      • Select the period to check the monitoring information collected for the selected period.
      • Click the [Refresh] button to refresh the graphs.
      • Click i_loadbalancer_enlargement to view an extended graph and click the [x] button to download the collected monitoring information as an Excel file.

    Delete target groups

    Note

    If a Target Group is connected to a Load Balancer, you cannot delete the Target Group. Delete the Load Balancer first and delete the Target Group.

    To delete a Target Group, follow these steps:

    1. Click Services > Networking > Load Balancer in order on the NAVER Cloud Platform console.
    2. Click the Target Group menu.
    3. Select a Target Group to delete and click the [Delete] button.
    4. Check the content on the delete Target Group popup window and click the [Delete] button.
      • Selected Target Group is deleted.

    Proxy Protocol

    Proxy Protocol is a protocol to check the Original Client IP address that requests connections from a Proxy environment given you use TCP and SSL protocols for Load Balancer.

    To check the client's IPs for each protocol you set for Load Balancer, follow these steps:

    ProtocolMethod
    HTTP, HTTPSX-Forwarded-For
    TCP, TLSProxy Protocol

    If you chose to use Proxy Protocol upon setting the Load Balancer rules, the Load Balancer calls the request as the following:

    PROXY_STRING + single space + INET_PROTOCOL + single space + CLIENT_IP + single space + PROXY_IP + single space + CLIENT_PORT + single space + PROXY_PORT + "\r\n"
    

    <example>

    PROXY TCP4 125.209.237.10 125.209.192.12 43321 80\r\n
    

    The Apache and NginX versions that support Proxy Protocol are the following:

    • Apache 2.2
    • Apache 2.4
    • NginX 1.11.12

    Proxy protocol settings

    To set up Proxy Protocol, follow these steps:

    1. Select TCP or SSL protocols in the 1. Create Load Balancer stage and click the check box for Proxy Protocol.
    2. Check the following steps to set according to the version:

    Apache 2.2

    To set up Proxy Protocol in the Apache 2.2 version, follow these steps:

    $ wget --no-check-certificate https://raw.githubusercontent.com/ggrandes/apache22-modules/master/mod_myfixip.c
    $ /{Apachelocation}/bin/apxs -c -i mod_myfixip.c
    
    • Add the following settings to the /{Apachelocation}/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 (e.g., 125.209.0.0/16 if LB IP is 125.209.197.92)
      </IfModule mod_myfixip.c>
      

    Apache 2.4

    To set up Proxy Protocol in the Apache 2.4 version, follow these steps:

    $ wget --no-check-certificate https://raw.githubusercontent.com/ggrandes/apache24-modules/master/mod_myfixip.c
    $ /{Apachelocation}/bin/apxs -c -i mod_myfixip.c
    
    • If you cannot find the apxs location, install the http-devel package and check again.

    • Add the following settings to the /{Apachelocation}/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 (e.g., 125.209.0.0/16 if LB IP is 125.209.197.92)
      </IfModule mod_myfixip.c>
      

    Nginx 1.11.12

    To set up Proxy Protocol in the Nginx 1.11.12 version, follow these steps:

    1. Check if the HTTP module is included on 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]'
    #Add to the 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?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.