The JasperReports Server instances deployed in a cluster are normal servers with no special configuration for the cluster. As with all server instances, they run in a Java servlet container that is usually implemented as an application server. While the load balancer may interact with the application server, JasperReports Server is not aware of the cluster environment in which it is deployed.
This document considers only the case of deploying a single JasperReports Server as the only application in a single application server on each computer. Therefore, in this document, a node refers to the real or virtual computer hosting a JVM, an application server, and a single instance of JasperReports Server.
Each node can be a physical computer or a cloud-based virtual computer, as long as the operating system is supported by JasperReports Server. For performance and stability reasons, we recommend that the only other software installed be the required Java Virtual Machine (JVM) and the application server. This design allows you to allocate as much memory as possible to the JVM and to JasperReports Server.
We also recommend that you use a lightweight application server such as Apache Tomcat or Glassfish. For example, Tomcat is a well-tested application server with JasperReports Server. A typical configuration for handling most reporting uses 64-bit Java with 2 gigabytes of memory allocated to the Java heap. See the JasperReports Server Installation Guide for guidelines and instructions to install JasperReports Server in your choice of application server and to configure your JVM.
In order to implement the partial session replication that JasperReports Server supports, the application servers must be configured to communicate with each other within the cluster. Some application servers also support more advanced cluster operations that are beyond the scope of this document, for example to deploy applications across all instances automatically. |
Finally, every instance must have an identical configuration, at least for certain key settings. While it is possible for each instance to be configured differently, this is not recommended. When instances are deployed on differing hardware with different configurations, the load balancer’s algorithm may not be effective. This is why we recommend that every server in the cluster be deployed on the same hardware and software, and have exactly the same configuration.
To deploy identical JasperReports Server instances, install a single instance from the WAR file distribution and configure it completely. Then copy the deployed WAR file to each of the other computers in the cluster. When using JNDI data sources provided by the application server, you must make sure they are pre-configured and identical on every application server. Often, the entire application server with JasperReports Server deployed within it can be copied as well. This is sometimes called “cloning” the server. Upgrades can be handled in the same way. Having identical JasperReports Server instances in your cluster greatly simplifies its installation and maintenance.
Another way to deploy identical instances to each node is to implement the configured WAR file on a shared file system and to access it from each application server with a symbolic link. You must make sure that working directories such as javaiotemp are not shared, and the shared file system should have its own redundancy and failover plan. Shared WAR files are an advanced configuration, and further details are beyond the scope of this document.
Recommended Comments
There are no comments to display.