Load Balancing

What is Load-Balancer: How does it work?

Load balancing is a commonly used term when it comes to hosting. A load balancer serves as a load distributor in server infrastructure. The response time and the load on individual servers are assessed and the performance of the servers is increased through a corresponding load distribution. The load balancer is connected upstream of the servers and distributes the requests so that no server is overloaded. Even if a single server fails, the load balancer steps in and redirects the requests to the remaining servers. The load balancer thus increases the availability and performance of the webserver. In addition, a load balancer ensures cross-location fault tolerance, simplifies the configuration of a server cluster, and improves the scalability of the available resources and communication between the servers.

Different types of load balancing

Load balancing solutions can be implemented with the help of special hardware or software. Depending on the project and requirements, one or the other variant offers more advantages. A layer 4/7 switch is often used as a hardware load balancer.

A distinction is also made between shared load balancing and dedicated load balancing. In the former, the physical resource is used by several users (e.g. hosting customers), but these are strictly separated from each other and can define their rules individually. In the second variant, there is only one user on a hardware resource.

Load Balancing and 500x Errors
Importance of Load Balancing in terms of SEO is that preventing the 500x errors as much as possible. Also, Faster Response Times means that better Crawl Efficiency along with better UX.

Load balancing: From Round-robin to Least Response Time

Various methods are used in load balancing. The simplest of these methods is round-robin. With this round-robin procedure, the servers are checked one after the other for their load and the first server that is not loaded receives the request. In the dynamic least connection procedure, the request is assigned to the server that is currently serving the fewest connections. There is also the weighted distribution method, in which the servers are weighted according to their performance. With the Least Response Time method, the server with the shortest response time is selected.

Load balancing algorithms determine which servers receive certain incoming client requests. The standard methods are as follows:

  • The hash-based approach calculates the preferred server of a specific customer on the basis of certain keys, such as HTTP headers or IP address information. This method supports session persistence or stickiness, which benefits applications that rely on the user-specific stored status information, such as shopping carts on e-commerce sites.
  • The least connection method favors servers with the fewest ongoing transactions, that is, the least busy.
  • The least-time algorithm takes into account both server response times and active connections – it sends new requests to the fastest servers with the fewest open requests.
  • The round-robin process – historically the standard for load balancing – simply goes through a list of the available servers in sequential order.

The formulas can vary considerably in their complexity and sophistication. Weighted load balancing algorithms also take server hierarchies into account, for example, with preferred servers with high capacity receiving more data traffic than those with lower weighting.

Round Robin Method for Load Balancing

The round-robin method manages with a single IP address. Instead of the DNS server, a NAT proxy takes over the load distribution. Instead of a list with the available servers, the proxy forwards all requests to the target systems known to it. It remembers which IP address was connected to which server and forwards a new request to this server. The advantage is that only one IP address is required for the Internet and this variant only requires little administration. Among other things, there is no need to maintain a list of servers. However, this is also not a correct load distribution. The status of individual servers is not taken into account.

Round-robin Load Balancing
Round-robin Method and its working style.

NAT with Feedback Method for Load Balancing

The step to real load balancing is only possible through the active exchange of load information between the servers and the load balancer. The NAT proxy is already the right direction. If it receives information on the real load on the individual servers, it can use the data to create a ranking list from which it can determine the next target server.

Communication between the server and the load balancer can take place via serial lines, periodic batch jobs, or SNMP queries. This increases the installation and configuration effort. The advantage of this procedure is the exchange between the server and the load balancer. If a server can no longer be reached, the load balancer simply removes its IP address from its list. If the server is running again, the IP address will be added to the list again.

NAT Method for Load Balancing
NAT Method for Load Balancing Schema.

URL-based Method for Load Balancing

The URL-based method for load balancing is especially suitable for HTTP or FTP servers. The load balancer uses the URL to decide which server is responsible for the request. To do this, the directories are stored on different computers. Before that, however, the data traffic must be analyzed to determine which areas require more computing power and bandwidth. The analysis must be repeated regularly during operation, as the usage behavior of visitors can change and the location of the directories may have to be adjusted. Since the load distribution results from the desired target directory, i.e. the data stream is filtered, special hardware or a very fast computer is required. The procurement of expensive or special hardware is usually unavoidable. This method is only suitable for websites, but not for e-mail servers or services with transactions.

URL-Based Load Balancing
URL-Based Load Balancing Schema.

Service-based Process for Load Balancing

Many servers are used as egg-laying wool milk sows. Usually, several services such as HTTP, FTP, and e-mail run on one and the same server. Under load, one service can steal the other service’s computing power.

All services use their own port under TCP, which is used to assign a data packet to an application or service. If you operate the services on different and independent servers, the load can be distributed depending on the service. An analysis of the data traffic must take place beforehand in order to find out the services with high consumption of computing power and bandwidth. This procedure is easy to install because the servers only need to be installed with the software whose service they then serve. Routing is carried out, for example, by a NAT router with configured port forwarding. For this purpose, a port with a fixed IP address is assigned in the router.

Service Based Load Balancing
Service-based Process Schema.

When to use which Load Balancing Method?

None of the processes described occurs in pure form as a solution. Usually, a combination of two or more methods is used. Either nested or integrated into each other. In any case, the result is a complex system that must be constantly monitored and adapted to new requirements. Since the data on the individual servers must always be synchronized, a central storage solution is recommended for all servers. 

These SAN systems are anything but cheap and they are available in different versions for SCSI, Firewire, Gigabit Ethernet, or Fiber Channel. Before using a load balancer, the existing programs and applications must be examined. Poorly programmed applications and slow applications also push a load balancer to its limits. A comprehensive analysis of the data stream is essential.

Load Balancing and Its Importance for SEO and UX

Load Balancing is a concept that is directly related to Back-end. For SEO and UX it is more concerned with the TTFB time concept. TTFB is the time required for any web page resource to be accessed from the server before it is loaded. During a session, the user can switch between different servers by Load Balancer. These transitions inevitably slow down the user experience. This situation is called Session Persistence. Websites without Session Persistence can irritate users as well as annoy crawlers.

Also, web developer teams may in some cases have developed a web page on only one of the servers while forgetting the others. In such cases, both Search Engine Crawlers and Users will see inconsistent pages. In some cases, there may even be differences in the Robots.txt file. Therefore, a Holistic SEO must know some concepts in terms of Load-balancing and be able to control it even by talking to the software team.

Our Load Balancing Guideline will be improved by time.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top