Summary: It is possible to install multiple instances of the CAST dashboards on one unique application server should you require. Note:
- This section assumes you are using an Apache Tomcat application server. Please also note that the documentation provided in this chapter is provided by CAST with no guarantees. It is not intended to replace any official Apache Tomcat documentation.
- Please make sure that multiple portals on the same application server are from the same version of the CAST Dashboard Package - it is not recommended to mix CAST dashboards from different versions of the CAST Dashboard Package.
This documentation is not valid for CAST Dashboard ≥ 2.x where you are using ZIP file deployment.
Number of dashboards per Tomcat instance
Tests have shown that it is possible to host up to 10 CAST dashboards on the same instance of Apache Tomcat, provided Apache Tomcat is run under a 64-bit JVM (JRE 7 64-bit (update 9 at least)) and on a supported 64-bit version of Windows.
How to create multiple portals
The easiest way to approach this is to:
- Fully install and configure your dashboards
- Stop your Apache Tomcat application server
- Using Windows Explorer, locate the deployment folder for your initial deployment: CATALINA_HOME\webapps\<dashboard>
- Copy the <dashboard> deployment folder and paste it to the CATALINA_HOME\webapps folder
- Rename the copied folder as required (for example to CAST-HEALTH_2).
- Reconfigure the CAST AIP schema connection information for the newly created dashboard
- Repeat these instructions if you require further dashboards
- Restart your Apache Tomcat application server.
- Access your new dashboards using the following URL - using the renamed deployment folder:
Tomcat memory configuration for more then 10 CAST dashboards
If you want to run more than 10 CAST dashboards on the same instance of Tomcat, the following memory configuration must be used:
- Stop the Tomcat service and access the Configure Tomcat option available in the Windows Start menu:
- Configure it as follows:
- Initial memory pool = 512MB
- Maximum memory pool = 3072MB
- Thread stack size = 256KB
- Add the MaxPermSize and PermSize options as shown in the image above set to 256MB each
- Restart Tomcat.
- this configuration has been tested with 20 legacy CAST Engineering Dashboards (CED)
- CAST did not use shared JARs when deploying the legacy CAST Engineering Dashboards (as described below)
Shared connection resource for multiple dashboard use (optional)
Because multiple dashboard can put a heavy strain on the Apache Tomcat server (particularly if each dashboard is large and complex), CAST recommends configuring Apache Tomcat so that some of the elements required to run the CAST dashboards are shared - this is, however, an optional configuration.
This sharing of resources ensures:
- Better memory utilization: the JVM is not forced to load redundant classes and methods in the Permanent Generation
- Accelerated startup/execution time: Apache Tomcat does not have to search multiple JARs to find a class
- Improved overall experience for users: users can obtain the information they require, when they want it
By default, the CAST dashboards are installed with a full set of .jar files. In a multiple dashboard scenario, each dashboard thus has an identical set of .jar files and some of these may even be unused. This redundancy can cause a heavy load on the JVM's memory, thus slowing down operations. CAST therefore recommends that some of the identical .jar files are shared for all dashboard and that unused .jar files are removed - this configuration is explained below.
This optimization has not been yet tested for other servlet containers (WAS, WLS,...), but should work more or less the same.
Before any of the following procedures are commenced, please make sure you stop the Apache Tomcat application server.
The first step is probably the most important - make sure you backup the CATALINA_HOME\webapps\DEPLOYMENT_FOLDER_NAME for each CAST dashboard installation
Optimizing JDBC driver .jar files
By default, CAST deploys JDBC drivers for all types of supported CAST Storage Service/RDBMS. These are located in the CATALINA_HOME\webapps\DEPLOYMENT_FOLDER_NAME\WEB-INF\lib folder (change the DEPLOYMENT_FOLDER_NAME to match each dashboard installation).
Microsoft SQL Server
CAST Storage Service
Move the JDBC drivers you require into the following locations
For example, if your dashboard interact with CAST AIP schemas running on Oracle Server, then move the Oracle JDBC driver to the shared location.
Once this has been completed, remove the JDBC drivers you do not require from each of your portal installations. For example, in the case of CAST AIP schemas installed on Oracle Server you can safely remove all Microsoft SQL Server/Postgres drivers from each of your portal installations.
Restart Apache Tomcat
The final step is to restart Apache Tomcat. The previous configuration changes will force Tomcat to use the .jar files in the shared location, rather than loading all .jar files in each portal installation.