Apache Load Balancing

Capacity planning is an important step to take when architecting any website or web application. A decision often arises during this process as to whether to scale the server farm vertically or horizontally. While vertical scaling involves adding more resources to existing servers as demands change to meet these needs horizontal scaling involves the preemptive or dynamic provisioning of a redundant pool of servers along with a load balancer. In order to avoid single points of failure in the environment, the latter option is often chosen.

Load balancers, in this scenario, are used to effectively distribute incoming traffic across the application servers in a pool of servers. Intelligent mechanisms allow the best performing and most suitable server to be targeted for individual client requests. In doing so, there are three primary objectives that the load balancer must achieve:

  1. Steer users to the correct and best performing application instance
  2. Prevent the risk of server overload through intelligent traffic distribution
  3. Optimize application traffic streams

Apache Load Balancer

Apache load balancer is an open source server application traffic distribution solution that, according to recent statistics, has been utilized in over 100,000 web sites. One of its main attractions for providing high availability to web applications is its customizability which allows it to be programmed to operate in a number of different modes depending upon the unique requirements of a given environment. These modes are configured using the MultiProcessing Modules (MPMs). In order to create your Apache load balancer you will need to have the apache module mod proxy and the mod proxy balancer which are readily available for download. The Apache Software Foundation provides support for its user community along with other open source applications.

While native Apache load balancer can meet the needs of some implementations, the programming knowledge and granular manipulation required to optimize it results in it not being suitable for every scenario. For this reason, dedicated proprietary hardware/virtual load balancers such as the KEMP LoadMaster are often leveraged to provide load balancing and application delivery services for enterprise websites and applications. The benefits of this approach include:

  1. Built-in application-specific optimizations
  2. Full Layer 4-7 Application Delivery Controller functionality
  3. Deployment Templates and an intuitive user interface

Whether to use an open source or dedicated proprietary load balancing solution for your environment will be based on the unique needs of your application and business. Be sure to examine the benefits and considerations that come along with solution in order to make the best choice for your deployment.