About the service
The load balancer distributes incoming traffic across multiple virtual backend servers, thereby providing high availability for the services provided by these servers. If one or more servers fail, traffic will be redirected to the remaining servers. A separate type of balancer is also used to ensure the operation of other VK Cloud services.
The VK Cloud load balancer is built on top of OpenStack Octavia, which is based on HAProxy. OpenStack Octavia provides the balancer with the following capabilities:
-
Proxying and balancing of HTTP, HTTPS, UDP, and TCP connections (the latter — including with proxy protocol support).
The proxy protocol when using the TCP protocol allows transmitting connection information to the server (for example, the client's IP address). For the server to process such information, it must itself support this protocol. The proxy protocol is supported by NGINX, Apache, Envoy, and other products.
-
Proxying and balancing of HTTP/2 connections in addition to HTTP/1.1.
-
SSL connection termination on the balancer.
-
Fine-tuning of time-outs.
-
Various balancing methods.
-
Setting weights for backends.
For fault tolerance, two balancer instances are supported, one of which operates in active mode and the other in standby mode. State synchronization and traffic switching between these balancers occur using the VRRP protocol. From the user's point of view, such a fault-tolerant configuration looks like a single balancer.
To ensure maximum balancer performance:
- Provide connections to backends using the HTTP/1.1 protocol with keep-alive support.
- Use the standard Ethernet MTU of 1500 bytes for traffic incoming to the balancer.
Under these conditions, the balancer can demonstrate peak performance, handling from 1 to 1.5 gigabits of traffic per second and about 10,000 requests per second.
VK Cloud has two types of balancers. The balancer type can be viewed in the management console.
Different types of balancers are billed differently.
Such a balancer is created by the user and can be used to provide fault tolerance and flexible scaling of applications:
- When working with the Cloud Servers service to distribute incoming traffic between virtual servers.
- When working with the Managed Containers service, for example, when using Ingress controllers (including the pre-installed one) or Load Balancer type services.
VK Cloud supports three balancing methods:
LEAST_CONNECTIONS— the backend with the fewest established connections is used.ROUND_ROBIN— all backends are iterated through sequentially.SOURCE_IP— a backend is selected randomly and assigned to the session for a specific client IP address.
The balancing method is selected when adding a balancing rule in the management console.