14.1. Creating Load Balancers¶
The forwarding rule and protocol cannot be changed after the load balancer pool is added.
If an IPv6 subnet where a load balancer will operate works in the SLAAC or DHCPv6 stateless mode, the load balancer will receive an IPv6 address automatically.
A network where a load balancer will operate has IP management enabled.
All VMs that will be added in balancing pools have fixed IP addresses.
14.1.1. Creating Load Balancer with Balancing Pools¶
On the Load balancers screen, click + Create load balancer.
In the Create load balancer window, do the following:
Specify a name and, optionally, a description.
High availability means using two instances of load balancers in the active-backup mode. If high availability is disabled, a single load balancer will be secured with the default platform high availability mode when a VM gets restarted on a new HW node in case of HW failure on the initial node.
In the Network settings section, select the network in which you have your service’s VMs.
Select the Use a floating IP address checkbox if you need to expose the service to the public, and then choose to use an available floating IP address or create a new one.
In the Balancing pools section, click Add to create a balancing pool to forward traffic from the load balancer to virtual machines.
In the Create balancing pools window that opens, do the following:
In the Forwarding rule section:
Select the protocol which is your service networking protocol, such as HTTP/HTTPS, TCP, or UDP.
Specify the LB port a front-facing port that you will use to connect from outside.
Enter the back-end port, a service port on your virtual machines.
In the Balancing settings section, select the balancing algorithm that determines how data flow will be balanced between the back-end virtual machines:
Source IP algorithm. It will guarantee that an external client (if its IP does not change) will be directed to the same back-end host.
Round-robin. It will direct each packet or session (for session-level protocols) to different back-end hosts.
Turn on the Sticky session toggle to balance the session’s level protocols, such as HTTP/HTTPS, to send the packets of the same session to the same back-end host.