Antistress for your server. Testing the Timeweb load balancer

Hello, Habr!



Today we will tell the community about the launch of our new service - Load Balancer .



Now the service is available to everyone in the open beta testing mode in the VDS personal account . It's free, of course, and we'll be grateful for your comments and suggestions.



Guys, why just now?



You may reasonably ask. We, like everyone else, are getting used to a new, post-pandemic (or not yet?) Reality and are responding to the needs of our clients.



Companies are immersed in total online, which means that the load on services is growing. The balancer distributes incoming requests to multiple servers to increase fault tolerance, and it also easily allows you to organize the scalability of any application.



The service will be especially relevant when one VDS can no longer cope with the load or you just want to increase the fault tolerance of the application.



How it works?



The balancer routes client requests to available production servers in the group. By regularly polling the status of the servers, the balancer understands which servers are active and available to process client requests.



If one or more servers in the group become unresponsive, they are excluded from balancing and clients do not end up on a non-operational server. As soon as such servers are restored, traffic to them is automatically returned, and this is what the balancer does, eliminating the need to independently monitor the availability of each server from the group.



In addition, because new servers can be easily added to a group, the load balancer can scale out. For example, with an increase in traffic or the number of requests, you can add new servers with your application to the balancing, and the traffic will begin to be evenly distributed across the entire group, which will allow you to process a larger number of client requests in total.



Okay, this is all clear, but how to try it?



You can create and manage balancers through the VDS control panel or using our API if you need to automate this process.



In the forwarding rules, we set the parameters of traffic forwarding, specify the incoming and outgoing ports, as well as the traffic protocol from the available ones: tcp, https, http, http2.







Then you can choose one of the two available balancing algorithms: Round Robin or Least Connections.



Which algorithm should you choose?



Round Robin is an algorithm in which the servers go around in a circle: the first request is sent to the first server, the next to the second server, and so on until the last server, after which the cycle starts over.



Least Connections is an algorithm in which each new request is sent to a server with fewer active connections.



To automatically control the availability of your servers, you can specify parameters in the "Check Availability" section: just set the port and protocol, as well as the intervals for background monitoring of server availability.



Now all that remains is to select your VDS or specify the IP addresses of the servers. By the way, you can use the balancer not only with our VDS. We will be all for it!



For each load balancer, we allocate 2 machines with haproxy, which are engaged in traffic balancing, the second machine in this scheme is redundant and eliminates problems with the availability of the balancer itself, so that it does not become a single point of failure for the entire system.



We undertake all the work on monitoring and ensuring the availability of the servers on which the balancer is located.



Tell us about your experience of using a balancer, ours or any other, in the comments. It is interesting to know your opinion.



Let the merciless beta begin!








All Articles