How to configure an Apache load balancer
At a certain amount of traffic, or a certain need on availability, you might consider using multiple public instances. Most likely those instances are on different servers as well. This guide will illustrate how to setup a load-balanced system using three different servers, where one acts as the load-balancer (using Apache for splitting the requests) and the two remaining servers host the LogicalDOC public instances.
Sticky session will ensure that one visitor generally will be handled by the same server over the lifetime of a session. This is a requirement for the proper functioning of LogicalDOC in this mode.
Actually there are two configuration options for Apache: proxy via mod_proxy and proxy via mod_proxy_ajp. The main difference is that mod_proxy sends http communications while with mod_proxy_ajp the messages exchanged between Apache and Tomcat take place in binary format.
Please choose one configuration. Trying to configure for both mod_proxy and mod_jk will only lead to confusion and tears.
- Configure Apache load balancer with mod_proxy
- Configure Apache load balancer with mod_proxy_ajp