Blog

The Internet never sleeps – why do we need a load balancer?

What do users consider important when it comes to apps? First of all, their availability. The availability of applications was never taken as seriously as today, when we don’t use applications for communication only, whether private or business, but when applications themselves are the business. Applications that are not always available, applications that are unreliable – lose their users and their importance, becoming non-existent as a result. In a matter of seconds.

Because the internet never sleeps and works 24x7x365, the same principle must also apply to applications. The scalability is key to achieving this and ensuring the application availability. One of the main factors to ensure availability is precisely – load balancing. Though many still consider load balancing to be something that can be achieved through a simple script and lessen the importance of advanced load balancing systems, the company F5 Networks focuses a greater part of its portfolio exactly on it and moves in that direction, all to provide its users with the access to their applications – anytime and anywhere, no matter which device they use.

That is why we will present several key methods of load balancing and its general importance in the following section.

Global Server Load Balancing

In the first place – this is not server load balancing at all, it instead refers to the availability of a particular location, i.e. data center, which again influences the availability of applications. GSLB is technology which ensures that we can find another data center when certain data center is unavailable, whether traditional or cloud data center.

In its basic form, GSLB uses DNS-based load balancing – meaning that there is a list of IP addresses associated with the domain and, when the first IP address is not available, it directs the request to the second IP address, then the third, and so on. This process is nothing revolutionary, however, it forms the basis for upgrading to advanced functionalities. It thus allows us to measure the performance of a particular data center and make decisions about directing users depending on that information or directing users to a geographically closer data center. Regardless of the preferred option, GSLB enables the allocation of user requirements between physically separated locations by returning the address of the available or selected location.

Old School Load Balancing

Applications are in this case hosted on multiple servers, with servers being divided in groups depending on applications they host. The idea is to send the user to the available resource. Still, this also involves several methods and factors that need to be considered. For example, a regular Round Robin does not take server performance into consideration. If we perform load balancing based on the minimum number of connections (Least Connection), we can greatly affect the performance of the server. This indicates that the right selection of load balancing method can greatly impact the availability of applications and the operation of the system as a whole.

Persistence

The majority of applications use the three-tier model, and the fact is that in the majority of cases they are stateful – information that the user exchanges with the application between requests and responses is stored and critical to both the correct functioning of the application and customer satisfaction. Some of this information refers to login data, shopping cart overview, status, last visited page, and so on. This implies that user requests must be directed to the same server during the entire session.

Load balancers implement persistence in a variety of ways, including the most popular cookie-based persistence method – user session information is stored in a cookie which is then used by the load balancer to properly direct the request to the appropriate server. Today, when using SSL/TLS protocols is practically a must, it is necessary to adapt the way we achieve persistence. SSL/TLS provides a secure session between the client and the server. To ensure that both sides are able to decrypt and use data modified through such connection, load balancer must be able to send requests to the same server where the session has started – that is why SSL/TLS based persistence is used. However, the use of persistence stresses the need for a careful consideration of the load balancing method which will be used. Namely, load balancer, above all, adheres to the table of persistent records. In such a scenario, Least Connection may be a good option as it ensures that no single resource becomes overloaded by initiated sessions while other resources “rest”. Other methods can easily lead to an individual resource running a large number of user sessions, which in turn has a negative impact on performance and, ultimately, the end-user experience.

Host-based load balancing

Host-based load balancing is one of the most common ways to achieve scalability. It is a common assumption that in this case load balancers are not necessary, since all web servers support this functionality. But that is not really the case. Although a web or an application server can have multiple hosts at the same time, it cannot always perform load balancing among them. And so – the load balancer.

Yes, of course web/application servers can direct user requests to a particular virtual server by themselves, but when we use load balancer – we are adding an additional level of efficiency and in this way reducing the number of servers and required hardware. In this scenario, load balancers enable simpler load planning and ensure the selection of the most optimal resource to process user request every time.

Route and Return – L7 (HTTP) Load Balancing

Not only HTTP, but other protocols also allow load balancing by information at the application level. However, we are mentioning the HTTP protocol as it is today probably the most widely spread and the most widely used for applications.

The HTTP protocol is extremely flexible and thus has the ability to base load balancing on virtually anything, including the HTTP payload. The majority of users choose to make a decision about load balancing based on what is written in one of the HTTP headers: host, cookie, user agent, etc.

However, the immensity of the HTTP protocol enables load balancing by absolutely anything that comes to your mind. In load balancing with HTTP protocols, first user requests are being directed, and only then load balancing is performed. When a user request is made, first a virtual server to which request will be sent is selected, and then the most optimal resource to process the user request is selected from the group of servers. HTTP also allows load balancing by the API version, where the API version is embedded in URI or a separate HTTP header. Load balancer can in this case distinguish different user request and ensure that a request is sent to the appropriate back-end service for processing.

And the final question – do you still think you don’t need LB? We have mentioned only several load balancer features, but if we take a look at the F5 portfolio and their F5 Local Traffic Manager, you will see just how much more additional functionality is available. Yes, the main task of load balancers was always the allocation of traffic among back-end servers. But the main task of load balancers today, in this demanding online world, is the advanced allocation of that same traffic. What is more, load balancers, such as F5 LTM products, additionally offer the advanced optimization of traffic that goes through them – from the TCP level optimization to numerous application level optimizations. They let us monitor all parts of the system and offload individual functions from the server to ensure the selection of the best resource for user request processing at all times, as well as that servers are doing exactly what they are supposed to do – deliver applications to users.

For more information on F5 LTM, as well as other F5 portfolio products – contact us!

Share on LinkedInShare on FacebookShare on Google+Tweet about this on Twitter
Need a quote or help in designing the solution that best fits your needs? Wondering what partner to choose for implementation?
Contact us!