Connect the balancer
- Unify servers with a private network.
- Configure routing to the balancer subnet.
- Order a balancer.
- Check the operation of the balancer.
connect the servers with a private network
To connect the load balancer you need to network the servers using a global router.
When creating a network, do not use subnet addresses on servers 10.128.0.0/16
. This subnet hosts load balancers, its use can cause load balancers to fail.
Configure routing to the balancer subnet
- Select the subnet on which to host the load balancer. The default subnet is the private subnet
10.128.0.0/16
but you can use another private subnet of dimensionality/16
. - Add the selected subnet to the global router that the merged the servers.
- Write routes on the servers to the selected balancer subnet.
Order a balancer
-
If your servers use the HTTPS protocol, add your TLS(SSL) certificate to the secret manager. You can also issue a Let's Encrypt® certificate.
-
В control panels go to Network services → Fault-tolerant load balancer.
-
Click Connect the balancer.
-
Select the tariff according to the desired channel width — 20, 50, 100 or 1 000 Mbps. If you need a different channel width, select Other and specify the required value in Mbps.
-
Specify the global router that was used to merge the servers — its name, ID or a list of subnets added to the router. You can view the router data in control panels: section Network services → Global router → router page.
-
Enter the private subnet that have chosen to place the balancer.
-
Select a balancing algorithm:
- Round Robin is a round robin algorithm in which requests are passed to each server in turn;
- Weighted Round Robin is a weighted round robin algorithm in which each server is assigned a weighting factor corresponding to its performance and capacity. Servers with a higher weighting factor receive more requests;
- Source IP hash is an algorithm that, depending on the HTTP header or IP address, selects a preferred server to receive the request;
- Least Connections — an algorithm that sends the request to the least loaded server.
-
If you want to use Sticky Sessions, check the checkbox Sticky Sessions.
-
Select the protocol of the target servers: TCP, HTTP, HTTPS.
-
If you selected the TCP protocol, specify the parameters for using the protocol — all private IP addresses assigned within the global router's networks, with the ports specified.
-
If you selected the HTTP protocol, specify all combinations of URLs received from the Internet and the IP addresses to which they should be redirected, including the port. For example,
http://domain.com/page — http://X.X.X.X:X
. -
If you selected the HTTPS protocol, specify:
- all combinations of URLs received from the Internet and the IP addresses to which they should be redirected, specifying the port. For example,
https://domain.com/page — http://X.X.X.X:X
; - The ID of the certificate you added in step 2. The ID can be viewed in control panels: section Cloud platform → The manager of secrets → tab Certificates → in the menu of the certificate, select Copy UUID;
- ID projects where the certificate is located.
- all combinations of URLs received from the Internet and the IP addresses to which they should be redirected, specifying the port. For example,
-
Optional: if you need to specify any additional data, enter it in the field Additional comment. For example, elaborate on the use case scenario, specify in which poolahs infrastructure is placed, leave an admin contact to get in touch and clarify details.
-
Click Connect the balancer.
-
We'll create and ship ticket to activate the service. Connection takes up to seven working days. When the balancer is ready, we will send you a secure public IP address in a ticket to which you should direct incoming traffic for balancing.
Check the operation of the balancer
- After the message that the balancer is connected, check that routes are configured between the network segments that host the target servers and load balancers.
- Test the load balancer by sending test requests to the received IP address.