Software load balancing is how administrators route network traffic to different servers. Load balancers evaluate client requests by examining application-level characteristics (the IP address, the HTTP header, and the contents of the request). The load balancer then looks at the servers and determines which server to send the request to.
Software load balancing is typically offered as a function of the application delivery controller (ADC) that runs on a standard server or a virtual machine. A hardware load balancing device (HLD) is a stand-alone piece of hardware that runs load balancing software. It is traditionally deployed as part of a pair, in case one load balancing device fails. Software load balancing offers the same functionality of an HLD, but it does not require a dedicated load balancing device. The load-balancing software can run on a regular server, or even a virtual server.
Software load balancing works the same way as hardware load balancing, distributing traffic among a pool of servers according to the chosen algorithm.
Distributing workloads across several servers through load balancing can make a network more efficient and reliable. Load balancing increases a network’s capacity because it uses the available servers in a more efficient way. As a result, load balancing makes the network run faster because workloads don’t get hung up on an overloaded server while other servers sit unused. Load balancing also ensures uninterrupted uptime when a server fails by directing traffic away from the failed server to functional servers.
Software-based load balancers may be installed directly onto a server, or they may be purchased as load balancer as a service (LBaaS). With LBaaS, the service provider is responsible for installing, configuring, and managing the load balancing software. The software-based load balancer may be located on-premises or off.
Like servers, load balancing appliances can be physical or virtual. Physical (hardware load balancing) and virtual (software load balancing) appliances both evaluate client requests and server usage in real time and send requests to different servers based on a variety of algorithms. Where the traffic is sent depends on the load balancing policy set by the administrator.
Load balancers use one of the following methods to determine where to send network traffic:
- Round-robin algorithm: The round-robin algorithm is the simplest method of load balancing. It simply moves requests through a list of available servers in the same order.
- Least-connections algorithm: The least-connections method is a bit more sophisticated. It sends requests to the least busy servers, or the servers that are processing the fewest workloads at a given moment.
- Least-time algorithm: The least-time algorithm takes it a step further and chooses servers based on both the fastest processing speed and the fewest active requests. This approach may integrate weighted load-balancing algorithms that consistently give preference to servers with higher capacity, compute, or memory.
- Hash-based algorithm: Finally, there is the hash-based algorithm, where the load balancing appliance assigns a unique hash key to the source and destination IP address of the client and server. This ensures that if the same user returns and makes another request, that user request will be directed to the same server they were using before. Plus, the server retains any data that was entered during previous sessions.
Software load balancing is gaining in popularity because it offers several advantages over hardware load balancing:
- Scalability: The biggest advantage that software load balancers have over hardware load balancing devices is their scalability. Software load balancers can add or drop virtual servers according to demand, responding automatically and in real time to fluctuations in network traffic.
- Flexibility: Software load balancers are also more flexible than hardware load balancers because they are compatible with a variety of environments. They can be programmed to work with standard desktop operating systems, cloud environments, bare metal, virtual servers, and containers. Hardware load balancers are not as flexible because they are not programmable.
- Cost: Organizations can save money with software load balancers, especially if they use LBaaS. Even if an IT organization purchases its own software load balancers, the cost is typically considered OPEX instead of CAPEX, where hardware load balancers would be classified.
- Ease of Deployment: Hardware load balancers can be difficult and expensive to install, but software load balancers are easy to deploy on demand, saving money and time.
- Security: Finally, load-balancing software that sits in between the client and the server offers an extra layer of security with the ability to reject suspicious packets before they reach the server.
While software load balancing appears to offer some clear advantages over hardware load balancing, an IT organization must weigh the pros and cons of hardware versus software versus as-a-service load balancing against the unique needs of their business. Organizations considering a software load balancer versus hardware load balancer will also want to weigh the benefits of each in the context of budget management. Any type of load balancing, when properly configured and managed, can make a network more efficient and reliable.