Create and Manage Load Balancer
    • PDF

    Create and Manage Load Balancer

    • PDF

    Article Summary

    Available in Classic

    We offer Load Balancer on Proxy basis for the Classic environment.

    Create Load Balancer

    The following describes how to create the Load Balancer.

    1. Access the NAVER Cloud Platform console.
    2. Click the Services > Networking > Load Balancer menu one by one in the order.
    3. Click the Load Balancer menu.
    4. Click the [Create Load Balancer] menu.
      loadbalancer-classiclb-classic_button_ko
    5. When the Create Load Balancer window appears, proceed with the following steps.
    Note

    The 2. Certificate Settings and 3. Cipher Settings stages only appear of you added HTTPS or SSL protocols on the 1. Create Load Balancer stage.
    If you only added HTTP or TCP protocols, please proceed without the 2. Certificate Settings and 3. Cipher Setting stages.

    1. Create Load Balancer

    Enter the information for the Load Balancer you wish to create and click the [Next] button.

    loadbalancer-classiclb-classic_create_ko

    • Network: Select the network type for the Load Balancer.

      • If you wish to use it for an internet service, select Public IP.
      • If you need an internal load distribution without exposing it to outside, select Private IP.
        • How to use a Private IP Load Balancer is same as how to use a Public IP-based Load Balancer. You can access it via the provided Private IP address without a domain.
        • If you wish to use a Private IP Load Balancer in Global region, you can process a steady, fast load distribution via using an exclusive network.
    • Select the zone to create a Load Balancer in.

      • If you chose Public IP as the network type in Korean region, you can increase the service capability by selecting both zones available.

      • You can connect all servers the account own regardless of the zone the Load Balancer is placed.

    Caution
    For the users of NAVER Cloud Platform's Security Monitoring, additional fee may occur. Please check. 
    
    • Enter the correct amount to Load Balancer Settings and click the [Add] button.

      • You can add up to 20 and the changed setting values are reflected in all applied servers.
      • Select a protocol.
      • Enter the Load Balancer Port number and server port number.
        • The Load Balancer port number cannot be used more than once but server port number can be used more than once.
        • The 22, 3389, 18080~18095, 64000, 65130, and 65131 ports are used for maintenance. You cannot use it as a Load Balancer port.
      • If you selected HTTP or HTTPS protocols, please enter L7 Health Check.
        • It must start with a slash(/). Enter the content location to run the health check.
          <Examples> /somedir/index.html
          <Examples> /index.html and /dir/index.html
        • Proxy Protocol is only activated upon selecting TCP and SSL protocols. For further information about Proxy Protocol settings, see Proxy Protocol.
      • HTTP/2’s check box is only activated upon selecting HTTPS protocols.
      • If you chose HTTPS protocols, select Server Protocol.
      • In order to delete an added setting, click the [Delete] button.
    Note

    For SSL settings, since the authentication is process in the SSL Offloading method, you do not need to set SSL again at the server linked with a Load Balancer. We recommend you to set port 80 for the server port instead of setting both Load Balancer and server ports to 443. If you need to operate a service via HTTPS in the server as well, you can select HTTPS for the Server Protocol to configure it.

    • Select a Load Balancing Algorithm.

    2. Certificate Settings

    Note

    The Certificate Settings only appear if you added HTTPS or SSL protocols at 1. Create Load Balancer

    Among the certificates registered in Certificate Manager, Select a suitable certificate for the service and click the [Next].

    3. Cipher Settings

    Check the supported SSL protocols, Ciphers applied templates and applied SSL Ciphers and click the [Next] button.

    • Check the versions that supports SSL and TLS.
      • TLSv1, TLSv1.1, and TLSv1.2 are available.
    • Check the applied SSL Ciphers.
      • If SSL communication was checked among all Ciphers, it becomes the Cipher that allows connection from Load Balancer.

    4. Add Servers

    loadbalancer-classiclb-classic_addserver_ko

    1. If you need to, search and select a server to apply to Load Balancer in the All Servers field.
    2. Click the [>] button to move to Applied Server field.
      • To remove a server included in the Applied Server field, select the server to eliminate and click [<].
    3. Click the [Next] button.

    5. View Setting Information

    Check the setting information for Load Balancer and click the [Create Load Balancer] button.

    • A Load Balancer is created set to Stop.

    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.

    The following describes how to check the client's IPs for each protocol you set for Load Balancer.

    ProtocolMethod
    HTTP, HTTPSX-Forwarded-For
    TCP, SSLProxy 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“
    

    <Examples>

    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

    The following describes how to set up Proxy Protocol.

    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

    The following describes how to set up Proxy Protocol in the Apache 2.2 version.

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

      LoadModule myfixip_module modules/mod_myfixip.so
      
      <IfModule mod_myfixip.c>
      RewriteIPResetHeader off
      RewriteIPAllow 10.31.0.0/16  #Set to 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

    The following describes how to set up Proxy Protocol in the Apache 2.4 version.

    $ wget --no-check-certificate https://raw.githubusercontent.com/ggrandes/apache24-modules/master/mod_myfixip.c
    $ /{The location where Apache was installed}/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 /{Apache location}/conf/httpd.conf file.

      LoadModule myfixip_module modules/mod_myfixip.so
      
      <IfModule mod_myfixip.c>
      RewriteIPResetHeader off
      RewriteIPAllow 10.31.0.0/16  #Set to 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

    The following describes how to set up Proxy Protocol in the Nginx 1.11.12 version.

    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     }
    }
    

    Manage Load Balancer

    You can change and view the created Load Balancer status and you can change the Load Balancer settings.

    Change Load Balancer status

    The Load Balancer must be set as Operating to work normally. To change the status to Operating, ACG and server settings are required.

    Set ACG

    The NAVER Cloud Platform’s Load Balancer offers the Private IP Load Balancer feature. Upon setting up a Load Balancer, the designated Load Balancer port opens for Any bandwidth(0.0.0.0/0).

    The ACG of the servers applied to Load Balancer must have permission rules applied regarding Load Balancer.

    The following describes how to apply the permission rules regarding Load Balancer you created in ACG.

    1. From the NAVER Cloud Platform console, click the Services > Compute > Server menus, in that order.
    2. Click the ACG menu.
    3. Select the ACG of the server you applied to Load Balancer and click the [Set ACG] button.
    4. Enter the protocol, access source, and allowed ports for the created Load Balancer and click the [Add] button.
      • Enter 'ncloud-load-balancer’ for Access source.(You can check at the AccessControlGroup Source field in the Load Balancer's detailed information.)
      • Enter the server port number you entered upon creating the Load Balancer for Balancer Allowed ports.
      • In order to delete an added rules, click the [X] button.
    5. Click the [Apply] button.

    Server Settings

    To change the state of Load Balancer to Operating, the server port you set for the Load Balancer must match with the Listening port of the bound server.

    The following is how to change the server's server port to Listening port.

    1. Click the Services > Networking > Load Balancer menu on the NAVER Cloud Platform console one by one in the order.
    2. Select the Load Balancer to change the listener setting and click the [Change Load Balancer Settings] button.
    3. Edit the server port to match the server’s Listening port identically and click the [Add] button.
    4. Click the [OK] button.
      • Once the setting is done, the status changes to Operating.

      • Click the [View Load Balancer Status] to check the health check's result values run from the server’s port by the Load Balancer.

    Caution
     In some cases, the ncloud-load-balancer groups can communicate with VM upon constant health check request from Load Balancer, even if you deleted the rules after adding the ACG permission rule. To disconnect the communication for sure, restart the connected Load Balancer. 
    

    Load Balancer Settings

    The following is how to check the setting information and change the setting for Load Balancer.

    Note

    You can change the server applied to Load Balancer by clicking the [Applied Servers] button. For further information, see Change applied servers.

    1. Click the Services > Networking > Load Balancer menu on the NAVER Cloud Platform console one by one in the order.

    2. Click the Load Balancer menu.

    3. Select the Load Balancer to check or change the setting information and click the [Change Load Balancer Settings] button.

      • The Change Load Balancer Settings window appears and you can view the setting information of the Load Balancer.
    4. After applying changes, click the [OK] button.

      loadbalancer-classiclb-classic_edit_ko

      • You can change the Load Balancer Settings.
      • You can change the load balancing algorithm.

    Change Applied Servers

    The following describes how to view, add or delete the servers applied to Load Balancers.

    1. Click the Services > Networking > Load Balancer menu on the NAVER Cloud Platform console one by one in the order.

    2. Click the Load Balancer menu.

    3. Select the Load Balancer to change the listener setting and click the Change Applied Servers button.

      • The Change Applied Servers window appears and you can view the setting information of the Load Balancer’s applied servers.

      loadbalancer-classiclb-classic_server_ko

    4. To add a server, select a server to add from the All Server and click the [>] button.

    5. To delete a server, select a server to delete from the All Server and click the [<] button.

    6. Click the [OK] button.

    Manage SSL Certificates

    You can manage your SSL certificates at the Certificate List menu.

    To move to the Certificate List menu, click the [Manage SSL Certificate] button and click [Certificate Manager short cut] or click the Services > Security > Certificate Manager > Certificate List menus in the order.

    For the detailed information about SSL certificate management, see Certificate Manager Guide.

    View Load Balancer Status

    The following describes the connection status between the Load Balancer and server.

    1. Click the Services > Networking > Load Balancer menu on the NAVER Cloud Platform console one by one in the order.
    2. Click the Load Balancer to check and click the [View Load Balancer Status] button.
      • The Change Load Balancer Settings window appears and you can view the connection status between the Load Balancer and server.

    Monitoring Load Balancer

    You can check the regularly collected information for Concurrent connection, Connection per Second, Traffic In and Traffic Out for the selected period each as a graph.

    Note

    The collection interval changes depending on the selected period. Especially, the monitoring information collected by processing the distributed loads can be viewed by setting for the minimum of 1 minutes up to recent 1 year.

    Collection IntervalView Period
    1 min IntervalMax. 6 hours
    5 mins IntervalMax. 1 day
    30 mins IntervalMax. 1 week
    2 hours IntervalMax. 1 month
    1 day intervalOver 1 month

    The following is how to check the monitoring information of the Load Balancer.

    1. Click the Services > Networking > Load Balancer menu on the NAVER Cloud Platform console one by one in the order.
    2. Click the Load Balancer menu.
    3. Select a Load Balancer to monitor and click the [Monitoring] button.
      • The basic monitoring window for the Load Balancer 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.

    Edit the HTTP Keep-alive Setting

    HTTP Keep-alive is an option to reuse the existing connection when you wish to maintain the alive connection for a period of time and request connection again.

    The following describes how to edit the HTTP Keep-alive setting.

    1. Click the Services > Networking > Load Balancer menu on the NAVER Cloud Platform console one by one in the order.
    2. Click the Load Balancer to edit the setting.
      • It shows the detailed information of the Load Balancer.
    3. Click the i_loadbalancer_edit at Apply HTTP Keep-alive.
    4. Edit the setting to whether apply it and click the [Edit] button.

    Set Connection Idle Timeout

    Connection Idle Timeout is the duration to maintain the connection with Load Balancers. After the duration, the connection closes forcedly and disconnect. If you need an application that supports long transactions, you can control the option and set up the connection duration. The default is 60 seconds, and it can be set between 60 to 3,600 seconds.

    The following describes how to set up Connection Idle Timeout.

    1. Click the Services > Networking > Load Balancer menu on the NAVER Cloud Platform console one by one in the order.
    2. Click the Load Balance to set up.
      • It shows the detailed information of the Load Balancer.
    3. Click i_loadbalancer_edit of Connection Idle Timeout Setting (default : 60 sec).
    4. Edit the set value and click the [Edit] button.

    Delete Load Balancer

    The following is how to delete a Load Balancer.

    1. Click the Services > Networking > Load Balancer menu on the NAVER Cloud Platform console one by one in the order.
    2. Select a Load Balancer to delete and click the [Delete Load Balancer] button.
    3. Check the content on the Delete Load Balancer screen and click the [Delete] button.
      • The selected Load Balancer is deleted.

    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.