For Cloud Servers and Dedicated Servers managed in the Cloud Panel

With a load balancer, you can maximize data throughput and minimize server load at the same time. They can determine both the load and the response time of each server and use rules to distribute the traffic across multiple servers.

These are useful if your web applications must be deployed from multiple servers and need to have high availability ensured. For example, this applies to websites with high numbers of visitors.

The following questions can help you decide whether you need a load balancer:

  • Do you need several servers for deploying your web applications?

  • Is it necessary to ensure high availability for your web applications?

  • Is there a high traffic volume?

Note

You can also use multiple load balancers to ensure optimal distribution of traffic.

Before you can use a load balancer, you must configure it. This requires the creation of so-called listeners. A listener checks the connection requests of clients. For the configuration of the load balancer, the respective protocol, the port on the load balancer (client connection to the load balancer) and the port on the servers (connection of the load balancer to the assigned servers) are required. The listener then forwards the requests to one or more servers using the protocol and port number that you have configured.

Note

Load balancers can also access ports that are blocked in the firewall policy of a server being monitored. For example, if you are in the fields Port on the balancer and Port on the servers, enter the number 0 and the load balancer will access all ports that are blocked in the firewall.

TCP Protocol

If you use the TCP protocol in the configuration of the load balancer, the load balancer forwards the client requests to the servers without changing the header. When a load balancer receives the requests, it tries to establish a TCP connection to the server through the configured port. Because load balancers intercept and distribute traffic between clients and your servers, the access logs for your servers contain the IP address of the load balancer instead of the IP address of the original client. 

HTTP Protocol

If you use the HTTP protocol for your client connections to the load balancer and for your connections from the load balancer to the assigned servers, the load balancer parses the headers of these HTTP requests. HTTP requests and HTTP responses often contain header fields that provide contextual information, such as the X-Forward-For-Header. This header is used to transmit the IP address of the user when accessing a web server through a proxy server or load balancer. For this purpose the configuration of the respective application (e.g. Apache) must be adapted.

Note

For technical reasons, the transmission of the IP address through the load balancer - and thus the solution described here - only works with unencrypted accesses (HTTP). If the request is made via HTTPS, no header entry can be made because the communication between the client and web server is completely encrypted. Since no certificate can be installed on the load balancer, it is not possible to decrypt the communication between client and web server.

An overview of the Load Balancers configured for you can be found in the Network > Load Balancerssection. In this section, you will also find the most important information about the individual load balancers. More information can be found here.