VK Cloud logo
Updated at December 20, 2023   05:58 AM

Managing load balancers

You can manage load balancers: view, edit and delete them, add and modify balancing rules, manipulate public IP addresses.

Viewing a list of load balancers and information about them

  1. Go to personal account VK Cloud.

  2. Select the project.

  3. Go to Virtual networksLoad balancers.

    A list of load balancers will be displayed.

  4. Click on the name of the necessary balancer.

    A page will open with detailed information about the balancer. In this page you can also edit the balancer parameters.

Adding a load balancer

  1. Go to personal account VK Cloud.

  2. Select the project.

  3. Go to Virtual networksLoad balancers.

  4. Click Add balancer or Add.

  5. Set the balancer parameters:

    • Loadbalancer name.

    • Network: the network and subnet where the balancer will be located.

      The balancer will distribute incoming traffic to the selected services located in this subnet.

    • DNS-name: (Optional) DNS name for the balancer.

    • Assign external IP: if this option is selected, the balancer will be assigned a public IP address through which it will be accessible from the Internet. Otherwise the balancer will act as an internal load balancer. Such IP address can be assigned later.

      Select this option if you plan to place services behind the load balancer that must be accessible from the Internet. The option can only be selected if the network selected earlier is behind a router that has access to the Internet.

  6. Set the balancer rules.

  7. Click the Add balancer button.

Editing a load balancer name

  1. Go to personal account VK Cloud.

  2. Select the project.

  3. Go to Virtual networksLoad balancers.

  4. Perform one of the actions for the load balancer you want to edit:

    • Click on the balancer name.
    • Expand the balancer menu and select Edit balancers.

    This will open a page detailing the balancer.

  5. To change the name:

    1. Click on the pencil icon next to the current balancer name.
    2. Set the new name.
    3. Click the Rename button.

Managing public IP addresses

Assign a public IP address

If the balancer network is connected to a router with Internet access, you can assign a public (external) IP address to the balancer.

  1. Go to personal account VK Cloud.

  2. Select the project.

  3. Go to Virtual networksLoad balancers.

  4. Do one of the following:

    • Click the name of the necessary load balancer.

      On the balancer details page, click the Assign external IP link in the IP addressExternal IP block.

    • Expand the menu of the necessary balancer and select Assign external IP.

  5. Select the necessary public IP address from the list, or create a new one.

  6. Click the Confirm button.

Unassign the public IP address

If the balancer network is connected to a router with Internet access, and a public (external) IP address is assigned to the balancer, this address can be unassigned.

  1. Go to personal account VK Cloud.

  2. Select the project.

  3. Go to Virtual NetworksLoad balancers.

  4. Do one of the following:

    • Click the name of the necessary load balancer.

      On the balancer details page, click the x symbol next to the IP address in the IP addressExternal IP section.

    • Expand the menu of the necessary balancer and select Unlink external IP.

  5. Click Confirm.

Managing balancing rules

  1. Go to the balancer page to edit it.

  2. In the Balancer rules section perform one of the available actions:

    1. Add a balancing rule. Edit an existing balancing rule by clicking the pencil icon next to the rule.
    2. Remove an existing balancing rule by clicking on the trashcan icon next to the rule.

The following options are available when adding or editing a rule:

  1. Rule options:

    • Protocols and Ports (only when creating a rule):

      • The balancing protocol and port to be used by the balancer.
      • Destination protocol and port.

      If you select TCP balancing protocol, two destination protocols are available: TCP or PROXY. The Proxy protocol can be used if it is supported by the servers behind the balancer.

    • Balancing method:

      • LEAST_CONNECTIONS: use the backend to which the least number of connections are established.
      • ROUND_ROBIN: go through all backends one by one.
      • SOURCE_IP: assign a backend for handling traffic to a specific client IP address.
    • Allowed cidrs: IP addresses or subnet addresses from which connections to the balancer are allowed. This parameter can be used to restrict access to the balancer from trusted addresses only.

      If the parameter is not set, connections are allowed from any IP addresses (which is equivalent to CIDR 0.0.0.0/0).

    • Timeout parameters:

      • Client data: client inactivity timeout.
      • Member connect: backend connection timeout.
      • Member data: backend inactive timeout.
      • TCP inspect: timeout for additional TCP segments during content inspection.

      The timeout values are set in milliseconds. The minimum value is 0, the maximum value is 2073600000 (576 hours).

    • Send X-Forwarded-For header (for HTTP and HTTPS balancing protocols only): an option that allows you to enable the corresponding HTTP header to be sent to the backend. By default the option is disabled.

    • Apply to the following instances: tools to select virtual machine instances that will act as backends for the balancer. You can add an instance either by selecting it from the list or by selecting the tag assigned to the instance.

    • Certificate (HTTPS balancing protocol only): the certificate to be used by the balancer to terminate the SSL connection.

      You can select an existing certificate or load a new one.

      When you load a new certificate, specify:

      • Certificate Name.
      • Certificate and chain of certificates: a public certificate or certificate chain. You can either paste it into the field in text form or load it from a file.
      • Private key: A private certificate. Can be inserted into the field in text form or loaded from a file.
      • Password: password of the private certificate (if used). You can insert it into the field in text form or load it from a file.
  2. Backend availability check options (healthcheck):

    • Method of checking: TCP or HTTP.
    • Interval: check interval in seconds.
    • Number of attempts: the number of times to try before the backend is deemed inaccessible.
    • Timeout: timeout in seconds, after which it is considered that the backend does not respond to the check.

    The following parameters are only available for the HTTP validation type:

    • HTTP method: the method to use to check availability.
    • Response status: HTTP status which will make the accessibility check a success.
    • Query path: the path to use to test accessibility.

Removing the load balancer

This is a group operation: if necessary, you can remove multiple load balancers at once by selecting them using the checkboxes.

To remove a load balancer:

  1. Go to personal account VK Cloud.

  2. Select the project where the necessary load balancer is located.

  3. Go to Virtual networksLoad balancers.

  4. Perform one of the actions for the necessary load balancer:

    • Select the balancer using the checkbox, then click Delete.
    • Expand the balancer menu and select Delete balancer.
  5. Confirm the removal of the balancer.