This section gives two examples of load balancer configuration, Apache web server (httpd) and HAProxy. These sample configuration files are meant only as examples for testing.
Apache HTTP Server Example
The following changes configure the Apache HTTP server (httpd) as a load balancer.
1. | Add following line to the end of the httpd.conf file: |
2. | Create the following two files in the /conf folder of your httpd server. |
• | mod-jk.conf: |
• | workers.properties: |
HAProxy Load Balancer Example
The following example is a configuration for the HAProxy load balancer. HAProxy is a high-performance, free and open source load balancer for Linux/x86 and Solaris/Sparc.
Edit the /etc/haproxy.cfg file as follows:
Troubleshooting
In some cases, when you are using a proxy or load balancer, your users may have problems with loading links and other resource files in hypermedia documents. This can occur when JasperReports Server generates links to a specific node instead of the host server.
For example, suppose you have a setup with a proxy host and two servers as follows:
proxy_host | http://bi.example.com |
node 1 | http://node1:8080/jasperserver-pro |
node 2 | http://node2:8080/jasperserver-pro |
When the user accesses http://bi.example.com, JasperReports Server forwards the user to the login page on the first available node, http://node1:8080/jasperserver-pro. After login, when the user accesses hypermedia, JasperReports Server generates links to hypermedia resources using the base http://node1:8080/jasperserver-pro instead of http://bi.example.com.
To resolve this, set the following in the /WEB-INF/js.config.properties file on all nodes:
deploy.base.url=http://bi.example.com
Recommended Comments
There are no comments to display.