Difference between revisions of "Running many parallel instances"

From TempusServa wiki
Jump to navigation Jump to search
old>Admin
(Created page with "=== Preflight checklist === Before you go for a side-by-side setup please consider # Examine possibilities to use Exclusive group data ownership # Using docker containers ===...")
 
m (9 revisions imported)
 
(8 intermediate revisions by one other user not shown)
Line 1: Line 1:
=== Preflight checklist ===
 
Before you go for a side-by-side setup please consider
Before you go for a side-by-side setup please consider
# Examine possibilities to use Exclusive group data ownership
# Examine possibilities to use Exclusive group data ownership (easy)
# Using docker containers
# Using docker containers (grants full application isolation)


==== Adding more instances ====
==== Server setup (Tomcat) ====
* Put WAR file in a shared location
* Add descriptor file for each application in: /<tomcat>/conf/Catalina/localhost/


The file should contain a references in the codebase section
    <?xml version="1.0" encoding="UTF-8"?>
    <Context path="/TempusServa" docBase="C:/SharedApplications/TempusServa.war">
    ....
Note that new descriptor files can be added at runtime, and will not require a server restart.
==== Handling updates ====
Updates to the application are easy
# Update the .war file in the shared location
# Stop the application server
# Remove all folders inside /<tomcat>/webapps
# Start the application server


==== Saving memory ====
==== Saving memory ====
Line 16: Line 32:


Move all .jar files from the war files /WEB-INF/lib folder, except for: p2eShared.jar.  
Move all .jar files from the war files /WEB-INF/lib folder, except for: p2eShared.jar.  
The easy way to complete this this task is to rename the .war til .zip, move the files, and rename back to .war.
The easy way to complete this this task is to rename the .war til .zip, move the files, and rename back to .war.

Latest revision as of 11:55, 10 December 2021

Before you go for a side-by-side setup please consider

  1. Examine possibilities to use Exclusive group data ownership (easy)
  2. Using docker containers (grants full application isolation)

Server setup (Tomcat)

  • Put WAR file in a shared location
  • Add descriptor file for each application in: /<tomcat>/conf/Catalina/localhost/

The file should contain a references in the codebase section

   <?xml version="1.0" encoding="UTF-8"?>
   <Context path="/TempusServa" docBase="C:/SharedApplications/TempusServa.war">
   ....

Note that new descriptor files can be added at runtime, and will not require a server restart.

Handling updates

Updates to the application are easy

  1. Update the .war file in the shared location
  2. Stop the application server
  3. Remove all folders inside /<tomcat>/webapps
  4. Start the application server

Saving memory

Each application instance will consume 20 MB of PermGen memory (clasloader memory) if the document building functions are in use (approx. 5 mB instance if not). In order to reduce this amount to approx. 2 mB/application, all shared librarys could be moved to the webservers shared folder (Tomcat 6 is "lib").

This approach is only recommended if:

  • You are running no other applications on that particular webserver (can be done)
  • Sure that all applications will be using the same TS version

Move all .jar files from the war files /WEB-INF/lib folder, except for: p2eShared.jar.

The easy way to complete this this task is to rename the .war til .zip, move the files, and rename back to .war.